Opening a subform on a record from the mainform and still be able to navigate.

K

Kokliko

I am trying to open a sub form using the Openform macro
I want to open the subform displaying a certain record from the main form… I can do that using the “Where condition†in Open form – but then it is creating a filter and I cannot navigate between the rest of the records in the subform without first doing an “Remove Filterâ€
How can I open the subform on the record specify in the mainform and still be able to navigate between the records
Many thanks
 
S

Steve Schapel

Kokliko,

I believe you are using the word 'subform' incorrectly. It sounds like
you are really opening a second separate form. I think to achieve what
you want, you will need to use the OpenForm action to open the secong
form, no Where condition, and then follow it with a GoToControl action
to set the focus to the key field that defines the link to the first
form, and then a FindRecord action to move to the required record. The
entry for the Find What argument will be something like...
=[Forms]![NameOfFirstForm]![NameOfKeyField]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top