Hello All... wondered if anyone could give me some advice on the best way to do the following... (see attached db)
Ref: Frm_Search
I am trying to put an error message in place so that a user cannot click the OK button without first having either typed a company name in the text box (txtSearch) or picked one from the list...
The way I was considering doing this was to write some code on the on_click event of the OK button along the lines of 'If txtSearch = Null then MsgBox = 'You must choose a company' (or something to that effect)
To make this work I believe I am going to need something which when a user clicks on one of the companies in the listbox it autopopulates the text box above with that companies name... ??
The list box is populated from a query (Qry_SearchProspect / Qry_SearchClient)
Unless anyone else has any other ideas - all are very welcome
Ref: Frm_Search
I am trying to put an error message in place so that a user cannot click the OK button without first having either typed a company name in the text box (txtSearch) or picked one from the list...
The way I was considering doing this was to write some code on the on_click event of the OK button along the lines of 'If txtSearch = Null then MsgBox = 'You must choose a company' (or something to that effect)
To make this work I believe I am going to need something which when a user clicks on one of the companies in the listbox it autopopulates the text box above with that companies name... ??
The list box is populated from a query (Qry_SearchProspect / Qry_SearchClient)
Unless anyone else has any other ideas - all are very welcome