Opening a form within a form

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

Guest

I have a form (A) and in that form I want to have a control that will open a
data entry form(B). Every time I try code or a macro it takes me back to my
first record on the data entry form no matter what record I am on in form (A).
I cannot get these 2 forms to be linked together. The info in both forms are
in the same table.
Please help me. I am new to this coding thing so simple is good.

Thank You in adavance
Mal
 
Are you using the DoCmd.OpenForm command to open your data entry form? If
so, add a string to the WhereCondition parameter of the OpenForm call,
something like:

DoCmd.OpenForm "B", , , "[ID]=" & Me.ID

Where [ID] is the primary key field in your table and Me.ID refers to that
field's value on form A. That should restrict the records that form B sees
to only that one with the current ID value.

Carl Rapson
 

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

Back
Top