I have a form that normally opens to show all clients. I have another form which lists invoices in a subform. I have made the invoices so that they can be selected and at the bottom I have a field that shows the currently selected client reference. I wish to be able to open the clients form with just the client whose reference was selected and have put a button under the list on the subform.
For some unknown reason, when I click on the button I am prompted to enter the client reference! The code behind the button is:
where 'Selected' is the field containing the Client reference I want to open. Am I getting the syntax wrong or something?
For some unknown reason, when I click on the button I am prompted to enter the client reference! The code behind the button is:
Code:
DoCmd.OpenForm "Clients", , , "[Client Ref] = Me.[Selected]"
where 'Selected' is the field containing the Client reference I want to open. Am I getting the syntax wrong or something?