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
How to hide a value in the report
SBS 2003 Network Configuration and DCHP
Expert Notify Thread - For Experts only (those answering questions in the MS Access Zone).
Append from Access to SQL Server key violation on any second query
Can I use GPO to uninstall IE 8 ?
VPN client (Check point Secure client) not able to browse to any website on the machine once connected to the VPN.
How do I migrate Exchange 2003 Public Folder to Exchange 2007 using PFMigrate?
Internet Explorer 7 - Slow to load Initially
How do you import outlook express 6 messages into Windows Live Mail and have them in the proper folders?
Sending Object Via MessageQueue