How to select record in the subform and to show it in the main form?

  • Thread starter Thread starter Chipcom
  • Start date Start date
C

Chipcom

Hi

I have subform with datasheet view and I need to know how to select
record in the subform and to show it in the main form?

Thanks
 
Hi

There are other methods but a simple one to use would be

DoCmd.GoToRecord acForm, "MainFormName", acGoTo,
Forms!MainFormName!SubFormName.Form!LinkIngPrimaryField

Change
MainFormName
SubFormName
LinkIngPrimaryField (control name)
to what they really are

I would use this OnClick of the form

Good luck
 
Forget my last post. I misuderstood your question. The code I gave will
give the record "number" (sort o count from the table start) not the refered
to record.
 
Back
Top