I'm making very heavy weather of trying to open a query by selecting the name I want from a form with a combo box on it. I've done this on a different form in the past, but now can't work out how I managed to get it working then.
When I have my form "F_Initial_Contact" open, I select the name I want from the combo box "Combo_new" and this then brings up the details for that record. I have now added a button to the form, to open a query for that record, but when I click on the button the query opens but brings up no record at all.
The query I am bringing up is:
SELECT T_Names.ID_No, T_Names.surname, T_Names.firstname
FROM T_Names
WHERE (((T_Names.ID_No)=[Forms]![F_Initial_Contact]![Combo_new]));
what I would like it to do is, for example, when I select Mr Smith on the combo box, then the record on the screen would be for Mr Smith, and clicking on the button would open the query for Mr Smith.
Any help would be gratefully received.
When I have my form "F_Initial_Contact" open, I select the name I want from the combo box "Combo_new" and this then brings up the details for that record. I have now added a button to the form, to open a query for that record, but when I click on the button the query opens but brings up no record at all.
The query I am bringing up is:
SELECT T_Names.ID_No, T_Names.surname, T_Names.firstname
FROM T_Names
WHERE (((T_Names.ID_No)=[Forms]![F_Initial_Contact]![Combo_new]));
what I would like it to do is, for example, when I select Mr Smith on the combo box, then the record on the screen would be for Mr Smith, and clicking on the button would open the query for Mr Smith.
Any help would be gratefully received.