TeresePamela
Programmer
The background:
A user selects 1 of 4 fields to search on by selecting from an Option Box, this selection opens a 2nd form, the user then enters the desired criteria into a text-box on the 2nd form and clicks a "search" button. I'm ok to this point and have the values of both forms (option and criteria) stored and passing ok.
My Problem:
When the user clicks the search button of the 2nd form I want a 3rd form to display the file in list-box format, with the data sorted on the field selected in form 1 and with the first displayed record being the FindFirst that matches the criteria in form 2 (which may be a partial entry). I thought of creating four queries for the sort criteria and using the queries as the recordsource of the listbox, but can I change the value of the recordsource property via vba (which I would do based on the option selected in form 1)? And how in the world would I get the listbox to go directly to the first find of the criteria???
As always any input will be greatly appreciated.
Pam
A user selects 1 of 4 fields to search on by selecting from an Option Box, this selection opens a 2nd form, the user then enters the desired criteria into a text-box on the 2nd form and clicks a "search" button. I'm ok to this point and have the values of both forms (option and criteria) stored and passing ok.
My Problem:
When the user clicks the search button of the 2nd form I want a 3rd form to display the file in list-box format, with the data sorted on the field selected in form 1 and with the first displayed record being the FindFirst that matches the criteria in form 2 (which may be a partial entry). I thought of creating four queries for the sort criteria and using the queries as the recordsource of the listbox, but can I change the value of the recordsource property via vba (which I would do based on the option selected in form 1)? And how in the world would I get the listbox to go directly to the first find of the criteria???
As always any input will be greatly appreciated.
Pam