Opening a sub form at a particular record

M

martin.dion

I am desiging an application that contains a main form. On that main
form, there are menu buttons on the left, and when you click them, it
loads the corresponding form on the right.

__________________________
| | |
|Menu| Subform |
| | |
| | |
| | |
| | |
| | |
| | |
-----------------------------------------------


What I want, is that when a record is chosen in one of the subforms, i
can save its id so when i return to that subform, i can go straight at
that record.


What is the best way to do this ?
On which events from the subform / mainform should i save and use the
saved value to return to the good record ?

Thanks
 
M

martin.dion

I am desiging an application that contains a main form. On that main
form, there are menu buttons on the left, and when you click them, it
loads the corresponding form on the right.

__________________________
| | |
|Menu| Subform |
| | |
| | |
| | |
| | |
| | |
| | |
-----------------------------------------------


What I want, is that when a record is chosen in one of the subforms, i
can save its id so when i return to that subform, i can go straight at
that record.


What is the best way to do this ?
On which events from the subform / mainform should i save and use the
saved value to return to the good record ?

Thanks

Nevermind, I found a solution to my problem.

I added a property to my main form that is read/write.
On the form_current of the subform, i write the id to the property in
the main form.
on the form_open of the subform, i read the id in the property of the
main form using me.parent.property
then i do a basic findfirst
 
Top