mstoolmi
asked on
Create a new record in one table that includes data from another table in Access 2007
I have a client table that is linked to a number of other tables that contain survey instruments. On the client record form, I have buttons that connects to each survey and create a new record. When the survey record is created, I would like the client_id field to be populated by same id from the client table record where the button was clicked. I thought that the best way to handle it was to create a temporary variable and set it equal to the id in the client table, then create the new record in the survey table, and set the client_id field to the temporary variable.
How do you set the client_id to the temporary variable? Or is there another way to set the client_id field to the right id?
How do you set the client_id to the temporary variable? Or is there another way to set the client_id field to the right id?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
" I have buttons that connects to each survey" - if you are adding records with code, you also can use value of this field (Me.client_id or something like it).
If you can upload your DB with dummy data, we can help more.