Foreign key from another table, and a primary key from the one being used.
i am still sort of a novice to access programming,
I have “tblMain” with a primary key “tracking number”
“tracking number” has a one to many with the table “tblPend”
“tblPend” has a primary key “RecordNo” and a status check box “status”
Status will either be marked yes or no.
All of these fields are on a form “frmPend”
This form opens from another form, but carries the tracking number from a field on the previous form. A subform at the bottom of the form runs a query “QryPend” and brings up all records in “tblPend” that have the referenced tracking number.
What I want the form to do is take the referenced tracking number, and open the first record with a status of yes in the form.
i can get the dlookup to work, but it looks it up for all tracking numbers not the tracking number specific to the form.
Can anyone help?
i am still sort of a novice to access programming,
I have “tblMain” with a primary key “tracking number”
“tracking number” has a one to many with the table “tblPend”
“tblPend” has a primary key “RecordNo” and a status check box “status”
Status will either be marked yes or no.
All of these fields are on a form “frmPend”
This form opens from another form, but carries the tracking number from a field on the previous form. A subform at the bottom of the form runs a query “QryPend” and brings up all records in “tblPend” that have the referenced tracking number.
What I want the form to do is take the referenced tracking number, and open the first record with a status of yes in the form.
i can get the dlookup to work, but it looks it up for all tracking numbers not the tracking number specific to the form.
Can anyone help?
Comment