I have a listbox of people from a query called "NamePedigreeQRY". The query also has the primary key (F_ID) from my main form/table. The listbox only shows the name of the people, but it does not show the F_ID.
I want to use a macro to select a person from the list and go to that record in my main form (FamilyFRM). I can use VBA but I'd prefer to use macros.
I tried to copy an example of a macro of an "After Update" event:
Action: SearchForRecord
Arguments: , , First, ="[F_ID] = " & Str(Nz([Screen].[ActiveControl],0))
It gives me a "Type mismatch" error. I'm guessing it is looking for the FieldAs field from my query = "Washington, George & Martha" instead of the corresponding F_ID = 4. Of course, there is no record in my tables containing "Washington, George & Martha".
-----------------------------------------------------------------------
FamilyTBL - Table holds family specific information.
FamilyFRM - Main form
IndividualTBL- Table holds family member specific information.
IndividualFRM - Subform
Role1QRY - Query to get the father's name.
Role2QRY - Query to get the mother's name.
NamePedigreeQRY - Query to concatenate the last name with father and mother.
FieldAs - Field in the "NamePedigreeQRY" which holds the concatenated name.
F_ID - Primary key of the family from "FamilyTBL". This is also a column in "NamePedigreeQRY".
Thank you.