Microsoft
Software
Hardware
Network
Question : Multiple criteria for ms access query
I have a form that has users enter search criteria to search a database for computer equipment which will then open a new form showing each of the records that meet the entered criteria. The fields on the form are location, decription, ram and cpu. I have a query that searches using what has been entered for location or description as they are straightforward but for the ram and cpu i need to do something more complex.
The form allows users to enter <, > or = in a combobox (e.g. ComboRam), this field does not exist in the database but is only used for searching. I also have a text box that allows the user to enter a number (e.g. TextRam), this field is the number field in the access table that stores the ram total. My problem is how to i get the query to use the <, >, =, symbol in the search criteria? I have tried concatenating the two but this does not seem to work.
In summary i have a form that users open to enter information to search on. Desciption, Location, RAM and CPU, the user may not want to search by all fields so some may be left empty. These are all fields in the database but the user needs to be able to search on a all or a combination of the four fields. The trouble is the user may wish to search for PC's with RAM of more than 128 or CPU =1200 (as examples).
How do i put this in the search criteria of the query so that when the results form opens it only includes those?
I think it is about concatenating the two but i am unable to get this to work whatever i have tried.
e.g. [Forms]![FrmSearch]![Combo
CPU] & [Forms]![FrmSearch]![txtCP
U]
Answer : Multiple criteria for ms access query
It opens a simple Results form; you can modify your Search Results form as needed to use tiltered query as its record source. Here is the modified database.
HBF-Modified-ITDB.zip
(412 KB)
(File Type Details)
Modified database
Random Solutions
CF - Syntax error in Update statement
Sum column in datagrid
Use of Pipes?
Variable 'dataRS' is used before it has been assigned a value. A null reference exception could result at runtime.
how to pull week day and time from a query
set isql output file format
How to overline in Word2003?
MS Access AS400 Function Understanding
WSS 3.0 migrate site from development machine to production server - Best practices
File sharing performance reduced after SP2 installation