GoTo Current Record

  • Thread starter Tom via AccessMonster.com
  • Start date
T

Tom via AccessMonster.com

Hi,
I have two forms. The main form is in datasheet view. I have a command button
on the main form that uses a macro to open the second form. I would like the
second form to be open to the record in the main form that had the focus when
the button was clicked. I need that to be the only record to come up on the
second form. I tried to use the GoTo Record argument, but there is no goto
current record. Is there a easy way to do this?
 
T

tina

use a WHERE clause in the macro's OpenForm action to filter the RecordSource
of the second form to show only the record where the primary key value
matches the primary key value in the main form. something like

[SecondFormPrimaryKeyFieldName] = [MainFormPrimaryKeyFieldName]

substitute the correct field names, of course. see the OpenForm Action topic
in Access Help for details.

hth
 

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