Switching between forms but remembering which record was

mcdhappy80

Registered User.
Local time
Today, 16:38
Joined
Jun 22, 2009
Messages
347
How do I create this effect:
1) Open the main form which has a button to open another form
2) When the main form opens remember on which record I was on the main form
3) Open another form from main form and t that point main form closes (I've created this with VBA code)
4) Add new record to second form, save and then close the form. Closing the form opens the first (main) form (I've done this with VBA
5) When the main form opens again I want it to open on the same record from the data source I was when it closed.

I would appreciate if someone could explain to me what would be the easiest way to achieve this. Do I do this with record bookmarks (can someone please write a code for this) or by supplying the right open arguments in the DoCmd.OpenForm command?

Thank You
 
You could do it with a bookmark, but the simplest way would be not to close it in the first place. I'd set its visible property to false and then back to true instead.
 

Users who are viewing this thread

Back
Top Bottom