OK I give up. I have a main form with a combo box that has 2 columns in it. The first field is hidden and is a number that is used to reference other tables. The second field is a name that the user selects. When the user clicks on a print button, a report that is based on a query runs, the query has fields from a second table I'll call 'Second'. I want the query to look at the combo box on the main form, get the index value from the hidden first column in the combo box, and return only those items from the second table that have a matching index number.
I've tried the following sql:
SELECT Second.ID, Second.Name, Second.Gender
FROM Second
where ID =Forms!MainForm!ComboBox.Column(0);
but I get an error that there is an undefined function.
I've tried the following sql:
SELECT Second.ID, Second.Name, Second.Gender
FROM Second
where ID =Forms!MainForm!ComboBox.Column(0);
but I get an error that there is an undefined function.