Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search Form contains Checkboxes - Way to custom search based on this?

Status
Not open for further replies.

MsPeppa

Programmer
Jun 27, 2001
19
US
I have a form that is called "Custom Search" What custom search has on it are two option buttons "AND" & "OR". Then it contains Checkboxes with "Filenumber", "Incident Type", "Date of Occurence" and a few others, but those three should be enough to get my point across. What happens is the user is to select if they want the search to match all of them, or they want the search to just match at least one. After the user selects a checkbox a textbox appears and that is where they are supposed to enter the data they wish to search for in the corresponding field (so if they check filenumber a textbox appears for the desired filenumber, and the same for incident type and date of occurrence) What I want this program to do is to somehow create a query that says, depending on if the user selects AND or OR than it will search the records in that sense. So if the user selects "AND" and they check for "Filenumber" and "Incident Type" than it will search for those fields. Exact code would be great, but suggestions may also work in this situation. Just to give some starters I will give you the names below of all of my check, option and textboxes.

-----------------------------------------------------
FileNumber (Corresponding checkbox = FileNumCheck
Textbox = FileNumText)
IncidentType (checkbox = IncidentTypeChk
Textbox = IncidentTypeText)
Date of Occurrence (checkbox = DateChk
Textbox = DateText)

AND option button = Opt1
OR option button = Opt2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top