473,883 Members | 2,621 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to add Criteria 'rows' in a Query?

8 New Member

I want to do a Select Query without VBA, just using the wizard. The problem that I find is that I need to do more "OR" statements than 'rows'of criteria. Is there a way to add new 'rows'of criteria?
I have 9 rows to do "OR" statement, but I need to do 10 "OR" statements.

Oct 26 '11
13 14822
cristina m
8 New Member
Hi, I have solved the error "the query is too complex" with this:

Expand|Select|Wrap|Line Numbers
  1. WHERE (([Satellite Launches].Launcher=Nz([Forms]![QBF_Form_F]![Launcher] ,[Satellite Launches].Launcher) AND ...
However, I found a new problem: if in the user form, I select a field to filter by mistake, and then I unselect it, it does not work, because it is not null anymore, but it is 0, so it does not filter the way I want. How can I fix that??

Thank you
Nov 3 '11 #11
cristina m
8 New Member
I think I solved it with and IIF statement:

Expand|Select|Wrap|Line Numbers
  1. IIf(Nz([Forms]![QBF_Form_F]![Manufacturer],False),[Forms]![QBF_Form_F]![Manufacturer],[Satellite Launches].[Manufacturer])
Nov 3 '11 #12
32,584 Recognized Expert Moderator MVP
Cristina, I come back to look at this in detail a week or so later (apologies for the delay), but I find I can make little or no sense of most of what you say as you keep skipping from one problem to another. I can't tell what is related to your original question (which is the only one we're allowed to deal with in this thread). So I hope you managed to find workable solutions.

If not, then please post your current situation, as regards this question, in here or for any other questions in their own, new, threads.
Nov 11 '11 #13
1 New Member
MS Access 2013 still has this same problem with limited criteria rows in the graphical screen. If you do as NeoPa suggests and drop into SQL and edit the SQL with the clauses you want to add (this is pretty easy to do), then go back to the Graphical screen, you will see that MS Access adds more criteria rows.
Apr 4 '15 #14

Sign in to post your reply or Sign up for a free account.

Similar topics

by: dskillingstad | last post by:
I'm trying to set up a parameter query based on an unbound form. This search form has about 5 text boxes where the user can type in values within each box and search a specific table based on the values of those 5 text boxes. One of two of these boxes are based on date. The obvious part (being the novice that I am) I'm stuck on is having the query search based on 1 to 5 search values? In other words, I need the query to search based on...
by: meganrobertson22 | last post by:
Hi Everyone- I have a question about how to add and then use the "All" selection in a combo box. I am trying to figure out how to: (1) add "All" as a selection to a combo box and then (2) how to use the selection "All" as criteria for a field in a query, which is used to generate data for a report.
by: lucazz | last post by:
I have a form with 2 comboboxes (dept, section) and a listbox (employees). Listbox is based on a query with 2 criteria (Forms!Form!Dept and Forms!Form!Section). Whenever I choose values in both comboboxes listbox works fine. But how can I make section criteria optional i.e. when choosing dept I would see all the dept's employees, and when I need to choose section the list would get shrinked to just the section's employees. I've tried...
by: Birky | last post by:
Can you please help me understand how to build Criteria syntax within the Query Builder? If you have a field that is for a region (lets say for Midwest) and you have another field which breaks it down into a smaller geographical region like City (lets say Denver) how can I build the Criteria within the Query Builder to key off a previous select field to narrow down the location? If region Midwest is select within region...
by: dlajeune | last post by:
I have a VBA script that returns a value (such as "ON" or "BC" or "AB"). I would like to add that value as the criteria in my Access query. The work flow within VBA is Get values from form's listbox Concacanate values if user has made multiple selections Return value to the criteria selector within the query Run the query
by: tomric | last post by:
I have a query that filters data and places the results in several text boxes on a form. I want to take the numbers in those txtboxes and use them as criteria for a different query. How do you take data from a txt box and use it as criteria in a second query?
by: ziccardi | last post by:
When my query is executed it produces no results. However, if I copy and paste the criteria from the information populated and referenced in my query, it works fine. The criteria needs to be numbers. eg. In (1,2) The text in my criteria field is: In (!!) Here is the code: Private Sub VIEW_NewRate_Click() On Error GoTo Err_VIEW_NewRate_Click Dim MyDB As DAO.Database
by: EmilyL | last post by:
I have a database I'm creating to track sheep breeding records. My end goal is to be able to pull up a form which will list all of the offspring of a particular buck or ewe. I would like to be able to get it so that the same query and form will pull the results of either a buck or a ewe. The columns that I'm including my criteria for are the lamb's records which have a columns for the ewe (mother) and the buck (father) which are both saved as...
by: scottbouley | last post by:
I have a query that queries the work order table by date. I want to be able to query by last 30, 60, or 90 days. I'm using a combo box on my main form to select 30, 60 or 90 days. The bound column for the combo box should return >= Date()-30 >= Date()-60 or >= Date()-90 depending on which one is selected. I have the following code for the after update event for the combo box: Forms!..Form.Requery When I open the form I get the...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.