Problem with Forms and data records.

charlesburton

New member
Local time
Yesterday, 23:52
Joined
Dec 11, 2006
Messages
1
Hi I have a table called Users that is populated via a form. Within this form I have listbox that opens up another form. The problem I am having is that I want them to populate the same record, but currently the two forms populate seperate records within the table users.

Is there a way that I can link them to the same record on the table?

Any help would be greatly appreciated, as I've been trying for sometime now without success.

Thanks.
 
Normally, you would use the WhereCondition variant of the OpenForm method. Create a new button on your form, and use the wizard to open a form to show specific data. Examine that code and apply it to your listbox.

The trouble you will run into is that you can't access the same record from two forms at the same time. You will get an error message upon returning to the original form ("This record has been modified..."). You can avoid this by running a SaveRecord command prior to opening the second form (docmd.runcommand accmdSaveRecord).

EDIT: Just make sure you set the second form to 'Modal', so that users can't switch back to the first form without closing the second form. Or you'll run into the same problem.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom