GoTo Current Record

  • Thread starter Thread starter Tom via AccessMonster.com
  • Start date 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?
 
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
 
Back
Top