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
convert time and date format from asp.net to sql table
Word 2007 error on converter MSWRD632
Exchange 2010 OWA not working
Hiding library private members.
Full Screen
Help installing VS .NET 2005 Crystal Reports on web server
Global Error Handling - winform
Service is not saving the start parameter
The database has been placed in a state by user admin on XXX that prevents it from being opened or locked
Using qsort with a CArray