Filter the second form to the current form's ID when you open it from the button on the first form, e.g.
DoCmd.OpenForm "YourSecondForm", WhereCondition:= "UniqueID = " & Me.UniqueID
This assumes UniqueID is a number data type if its text you'd use the following, wrapping the value in quotes:
DoCmd.OpenForm "YourSecondForm", WhereCondition:= "UniqueID = """& Me.UniqueID & """"
Ken Sheridan Stafford, England
"Ian" wrote:
[Quoted Text] > I have 2 tables with a one-to-many relationship with a common uniqueID > connecting them. From the main table there is a main form with a command > button to open a second form. In the second, there is info from the main > form table (name, address, etc...) to help with identificaiton. I want the > second from to retrieve the uniqueID from the first form so it will grab the > rest of the info. How do I set form2 unique ID to be equal to form1 uniqueID?
|