Goto Record

I

iccsi

I would like to click a button on form A and go to specific record on
form B which is bound form.

I think that I need use DoCmd.GoToRecord on the form B.
I just wonder how can I get record number to use the function.

There is FindRecord Action to use for Marco. Is it possible to use the
action in VBA code to pass parameter every time user click on the
button?

Your help is great appreciated,
 
S

smk23

The simplest was would be to put code on the Click event of your command
button:

Dim strCriteria as string

strCriteria = "[RecordID]= " & Me.RecordID

DoCmd.OpenForm "FormB",,,strCriteria

HTH,
Sam
 
I

inungh

The simplest was would be to put code on the Click event of your command
button:

  Dim strCriteria as string

  strCriteria = "[RecordID]= " & Me.RecordID

  DoCmd.OpenForm "FormB",,,strCriteria

HTH,
Sam



iccsi said:
I would like to click a button on form A and go to specific record on
form B which is bound form.
I think that I need use DoCmd.GoToRecord on the form B.
I just wonder how can I get record number to use the function.
There is FindRecord Action to use for Marco. Is it possible to use the
action in VBA code to pass parameter every time user click on the
button?
Your help is great appreciated,- Hide quoted text -

- Show quoted text -

Is RecordId a field of the table?
I do not see this property in the form?

Thanks again,
 

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