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!

Another question for GURU'S only -challenging, but i'm not a genius :)

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

---------------------------------------------------

I have a command button called CmdSearch. That is to be pressed once the user makes their decision. Thanks in advance
 
Sounds like an ad for "paid professional services"?

A different approach would be to set up your forms/reports from the perspective of the users common needs. Review these objects with respect to the parameterizations customarily applied to them, and generate parameterized queries for each object. Have the uses select the object (form / report) and then present them with a form (tab really) with those specific parameters available to htem in convenient format (including defaults). When the User has completed the parameters, a command button should then open the object (form / report) as specified. If you set up the parameterization process carefully, it should be pratical to determine, in advance, which parameters should be amenable to logical operators and pre-program these so the user is only seeing the symbology on hte forn, while YOU the (paid professional) programmer do the magic behind the scenes.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top