Current record

  • Thread starter Thread starter Ken M
  • Start date Start date
K

Ken M

I have a query which provides data for 4 forms. These
forms are accesses from a main form via option buttons
and using a macro to open the form.
Each form captures different types of data all of whch is
contained in the query.
I need help as to how to ensure that each form opens with
the relevent data to the record on the main form. In
other words, open the new form with data from the current
record in the query.
I also need to edit fields in each form, but the main
form would be where I add a new record. Accessing each
additional form will add additional data to that record.
I hope this is clear. I have limited knowledge of Visual
basic but can adapt if I can be given a guide. I cannot
see how to do this with a macro, although it's obviously
something that would be a common request.
Thanks for any help.
 
Hi Ken, if you use the button wizard, it will take you through an OpenForm
where a value on it the form (the unique record ID) must match a value in a
field (the entry on your main form)
 
Ken,
I think I understand what you want to do.
Given a main form (ex. frmMain), there should be some unique identifying
field on each record... like CustID, SerNo, etc.
Let's use CustID for this example...
Use that unique value to "link" the forms you open up from the main form
(ex. frmSecond).

You can either use CustID from frmMain as a "criteria" in the query
behind frmSecond...
In the query for frmSecond in the CustID field...
=Forms!frmMain!CustID

or.... just open the frmSecond using a filter to yield just the matching
record
DoCmd.OpenForm "frmAddresses", , , "CustID = Forms!frmMain!CustID"

To make sure all your data entry is "synched", do a Refresh before
opening frmSecond, and do a Refresh when Closing frmSecond and returning to
frmMain
hth
Al Camp
 
Back
Top