I have two forms (program and locations) that are linked by programID.
Users go into Program Form, enter data, the programID is autoID. Then there is a "Add Location" button, to open Locations Form. And users can enter location information into Locations Form. One program can have multiple locations.
When clicking on that "add location" button, how do I retrieve the ProgramID from current Program form and insert into a new record in Location form/table?
Originally I thought of selecting "Max(programID)" from Program table. But what if users go back to previous entered Program Form and add more locations later on?
I am not familiary with VB. I tried to use macro, but not really successful.
Please Help!!
Thanks
Users go into Program Form, enter data, the programID is autoID. Then there is a "Add Location" button, to open Locations Form. And users can enter location information into Locations Form. One program can have multiple locations.
When clicking on that "add location" button, how do I retrieve the ProgramID from current Program form and insert into a new record in Location form/table?
Originally I thought of selecting "Max(programID)" from Program table. But what if users go back to previous entered Program Form and add more locations later on?
I am not familiary with VB. I tried to use macro, but not really successful.
Please Help!!
Thanks