Subform Tie in

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Sorry about the subject line, couldn't come up with anything intelligent.

I have subforms attached obviously to my main form. Is there/what is the code etc that if you opened the form by itself that I would put in a text box that would show whose record I was looking at.

Something is telling me I can't do this, but anywhooo Thanks
 
Sorry about the subject line, couldn't come up with anything intelligent.

I have subforms attached obviously to my main form. Is there/what is the code etc that if you opened the form by itself that I would put in a text box that would show whose record I was looking at.

Something is telling me I can't do this, but anywhooo Thanks

You can indeed, and it's pretty easy. You can use the Command Button
wizard to create an "Open Form" button; edit the code to change the
line

DoCmd.OpenForm strDoc

to

DoCmd.OpenForm strDoc, WhereCondition := "[your-key-field] = " &
Me![txtID]

(all on one line, using your own fieldnames of course).
 
Back
Top