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

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
 
G

Guest

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
 
G

Guest

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.
 

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