Hello everybody,
I am a little stuck on how to go about a particular task.. I have a form with several combo boxes and text boxes for user entry. What I would like to do is have a user go in and select the different values from the different combo boxes + enter values in text boxes, then press a command button that would open another form filtered with the user's selections and values they have entered in the text boxes. I want the user to have the option of leaving some combo boxes/text boxes blank to return all records for that field.
I have been able to do this with one combo box using the following simple code attached to the 'on click' event of a command button:
.........................................
Dim stLinkCriteria As String
Dim stDocName As String
stDocName = "Form3"
stLinkCriteria = "[Customer Name]=" & "'" & Me![Customer] & "'"
DoCmd.OpenForm stDocName, ,,stLinkCriteria
..........................................
I am unsure of how I would do this for a form with multiple combo boxes/text boxes.
Does anyone have any suggestions/samples??
Thanks in advance,
SteveD
I am a little stuck on how to go about a particular task.. I have a form with several combo boxes and text boxes for user entry. What I would like to do is have a user go in and select the different values from the different combo boxes + enter values in text boxes, then press a command button that would open another form filtered with the user's selections and values they have entered in the text boxes. I want the user to have the option of leaving some combo boxes/text boxes blank to return all records for that field.
I have been able to do this with one combo box using the following simple code attached to the 'on click' event of a command button:
.........................................
Dim stLinkCriteria As String
Dim stDocName As String
stDocName = "Form3"
stLinkCriteria = "[Customer Name]=" & "'" & Me![Customer] & "'"
DoCmd.OpenForm stDocName, ,,stLinkCriteria
..........................................
I am unsure of how I would do this for a form with multiple combo boxes/text boxes.
Does anyone have any suggestions/samples??
Thanks in advance,
SteveD