Double click subform record to cause action in another form

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

Guest

I want to double click a specific record in a subform containing a list of
names and have another form open showing the persons details. The person
detail already exists. How do I specify the record number I want to goto in
the persons details form?
 
Theresa said:
I want to double click a specific record in a subform containing a
list of names and have another form open showing the persons details.
The person detail already exists. How do I specify the record number
I want to goto in the persons details form?

Access doesn't really use record numbers, no matter what it shows you at
the bottom of the form. It uses key fields to relate a record in one
table to a record in another table. Presumably the table where people's
details are stored has a primary key field -- maybe a field named
"PersonID" -- that uniquely identifies the person. The subform's
recordsource must also include a field that contains the PersonID value.
That way, in your DblClick event, you can have a line of code along the
lines of:

DoCmd.OpenForm "frmPersonDetails", _
WhereCondition:="PersonID = " & Me.PersonID
 
Back
Top