Goto Record

  • Thread starter Thread starter iccsi
  • Start date Start date
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,
 
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
 
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,
 
Back
Top