On my main form I have a textfield (Age) and a combobox for forenames. I have a "Details" table where I have Forename, Surname, Age
when i enter an age and click go I want the combo box to populate with all of the Forenames that are that age.
for example
if i search for age 21
the combo box should populate with the following names from the details table.
peter
matthew
adam
I've tried using a DLookup and this just populates the combo box with just peter which is the first name in the table. this is my code
Many thanks
when i enter an age and click go I want the combo box to populate with all of the Forenames that are that age.
for example
if i search for age 21
the combo box should populate with the following names from the details table.
peter
matthew
adam
I've tried using a DLookup and this just populates the combo box with just peter which is the first name in the table. this is my code
Code:
cmbForename("Forename", "Details", "Age = '" & Age & "')