R
Ryan Langton
I'm designing my search form so that the user checks which field they want
to search using an option box containing option buttons. So they can
select:
All
Name
Serial Number
etc.
Then type what they want to search for in a text box and click "Search" (a
command button). I just need to clarify on my syntax since I'm not very
familiar with .adp yet and also some help with searching "all" fields. My
button-click event will look something like this:
SELECT CASE optSearchField
CASE 1 ' search all fields
' Unsure the best way to do this!
CASE 2 ' search name field
' Define stLinkCriteria and stForm
stLinkCriteria = "tblFieldName = '%" & txtSearchBox & "%'"
DoCmd.OpenForm stForm, , , stLinkCriteria
CASE 3 ' search Serial # field
' similiar to CASE 2
END SELECT
to search using an option box containing option buttons. So they can
select:
All
Name
Serial Number
etc.
Then type what they want to search for in a text box and click "Search" (a
command button). I just need to clarify on my syntax since I'm not very
familiar with .adp yet and also some help with searching "all" fields. My
button-click event will look something like this:
SELECT CASE optSearchField
CASE 1 ' search all fields
' Unsure the best way to do this!
CASE 2 ' search name field
' Define stLinkCriteria and stForm
stLinkCriteria = "tblFieldName = '%" & txtSearchBox & "%'"
DoCmd.OpenForm stForm, , , stLinkCriteria
CASE 3 ' search Serial # field
' similiar to CASE 2
END SELECT