Control Button help needed

O

Obeide115654

In the microsoft template database "Classroom"/ Classes form there is a
command button that will open another form (Students) on a specific record in
the subform. I can't figure out how to do this. Can anyone out there help
me?
 
P

Pat Hartman

The code behind the button is using the OpenForm method and is passing the
ID of the record to open to as part of the "WHERE" argument. Look up
OpenForm method (or action to see the macro version) and review the
arguments.
 
O

Obeide115654

Hi Pat,
Thank you for your reply, I can get this to work where there is a direct
relationship from a form, but not from a subform. How do I tell the OpenForm
to see the ID of the record in the subform? I'm sure it will be something
obvious i'm missing!
 
P

Pat Hartman

It is a matter of creating the proper reference:
Forms!yourmainform!yoursubform.Form!yourcontrolname
 

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