Passing IDs From One Form to Another

Lynn_AccessUser

Registered User.
Local time
Today, 07:10
Joined
Feb 4, 2003
Messages
125
I have 2 forms. Form 2 opens as a modal pop-up form on top of Form 1 so when the user closes Form 2 the last record they were working on Form 1 is still there.

I would like to do the same thing but close Form 1. In otherwords, if the user is working on record number 1011, it will pass this record number to Form 2 and close Form 1. In turn, when the user closes Form 2 it will reopen Form 1 to record number 1011.

The reason I want to close Form 1 is because I am getting lockups when multiple users are in the db so I am hoping by minimizing the amount of data open will prevent some of the lockups.

Thanks!
 
You shouldn't be getting lockups unless the people are updating the same records (or records contained within the same data page since record locks are at the page level). Make sure your default locking method is set to no locks unless you specifically want to make the default something else.

Use the where argument of the OpenForm method to "filter' the form that you are opening. You can also use the OpenArgs argument to pass the key field. That would be necessary if you close form 1 and form 2 needs to add new records with that foreign key value.
 

Users who are viewing this thread

Back
Top Bottom