In my database (see attached sample MS Access file), there is a form titled Construction Projects (frmConstructionProjects). On that form, there is a command button titled Go To Const Insp Form. When clicked, this button opens another form titled Construction Inspection Form (frmConstInsp). When I type information on this form, the system will add a record to the table titled tblConstInsp (the record source).
The Key field in table tblConstInsp is ConstInspID (data type is AutoNumber). The field ProjectID is also in this table. In this table, it's data type is Number and the display control on the Lookup tab is Text. The field ProjectID originally comes from the main table in the database which is titled Projects. In this table, ProjectID is the key field with data type as AutoNumber.
As I said before, when I enter a new record in the form frmConstInsp, all the data I type is being stored in the table tblConstInsp, except the system isn't automatically loading ProjectID. That's why when I close and reopen the form frmConstInsp, the data doesn't reappear. However, if I open the table tblConstInsp and type in the number for ProjectID, then the record does indeed reappear when I reopen frmConstInsp. I have yet to figure out how to make the system automatically load the number for ProjectID.
Any help in solving this puzzle would be greatly appreciated. Thanks in advance.
I'm just now getting back to this after working on higher priority tasks in my organization for months now. Could you help me understand what you meant when you said "pass the projectID in the openargs of the form open and then access them on formload." Did you mean the "On Open" event procedure? If so, can you help me with the VBA script. Thanks in advance to anyone for help.