473,396 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Access Query's... What Else?

Diificult for me to explain, and the sysop here has put a limit on images so I try to do it with 1 image: (Sorry about the "zoom" I don't know what's that all about, but it's still clear.. thanks for your time Please just change the thumb to full size.. thanks)

This is my desired result:



However, to get to that result does not make sense to me considering the criteria's OR operator.. Let me try to explain..

Why does my criteria have to be on the same row?

a} here is the original search: http://img401.imageshack.us/img401/2004/q1wx4.jpg

To get this result:
http://img294.imageshack.us/img294/5839/q2uv9.jpg

Now, when I add this "S4S" like this:

http://img294.imageshack.us/img294/672/q3ml7.jpg

the query bombs out and gives me this:

http://img413.imageshack.us/img413/8008/q4an4.jpg

So to get my query correct to show only "S4S" I have to change the desgn to this:

http://img413.imageshack.us/img413/7937/q5tp7.jpg

So I can get my desired result of this:

http://img413.imageshack.us/img413/5755/q6gt6.jpg

Why is that?

thanks
Jul 8 '07 #1
1 1075
puppydogbuddy
1,923 Expert 1GB
Diificult for me to explain, and the sysop here has put a limit on images so I try to do it with 1 image: (Sorry about the "zoom" I don't know what's that all about, but it's still clear.. thanks for your time Please just change the thumb to full size.. thanks)

This is my desired result:



However, to get to that result does not make sense to me considering the criteria's OR operator.. Let me try to explain..

Why does my criteria have to be on the same row?

a} here is the original search: http://img401.imageshack.us/img401/2004/q1wx4.jpg

To get this result:
http://img294.imageshack.us/img294/5839/q2uv9.jpg

Now, when I add this "S4S" like this:

http://img294.imageshack.us/img294/672/q3ml7.jpg

the query bombs out and gives me this:

http://img413.imageshack.us/img413/8008/q4an4.jpg

So to get my query correct to show only "S4S" I have to change the desgn to this:

http://img413.imageshack.us/img413/7937/q5tp7.jpg

So I can get my desired result of this:

http://img413.imageshack.us/img413/5755/q6gt6.jpg

Why is that?

thanks

The answer is very simple. Criteria in different rows are evaluated from left to right (first row), then down to next row. Criteria in the same row, different columns are evaluated as "And" criteria. Criteria in the same column, but different rows are evaluated as "Or" criteria. Therefore when you had the criteria set as follows:
standard..............S4S
utility

it is evaluated as follows:
(standard and S4S) Or Utility

in order to get it to evaluate the way you want it, you can do it either of two ways:
1.the first way is to put all your criteria in a single row like you did. Evaluating the criteria from left to right:(standard Or utility) And S4S .
2.the second way is to put your criteria in two rows as shown:
standard ..................S4S
utility........................S4S
which is evaluated from left to right and then down as follows:
(standard and S4S) Or (utility and S4S)
Jul 10 '07 #2

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

Similar topics

1
by: Joris Kempen | last post by:
Hi people, I know that the question has come around sometimes: How to open an Access Report using ASP and export it to for example RTF. I'm trying to implement the first method of David...
2
by: Mattyboy | last post by:
Guys I have built a database with saved queries that runs fine in Access but when I call it from the web using ASP, an exception occurs. I have tried multiple ways of testing the databases with...
1
by: Stefan V. | last post by:
Hello! I am trying to convert a query written for SQL Server 2000 database tables, to a MS Access query. Here is what I have in SQL Server: SELECT t2.*, CASE WHEN t2.QType = '3' THEN...
3
by: StBond | last post by:
Hi everyone, I am new to Access and Visual Basic so things my be getting across a bit cloudy. I only started using VB for one week. I am having a little problem with the database that I am...
5
by: Art | last post by:
Hi, Can anyone point me to an example of how I would execute a query I've created in an Access DB. I've copied the SQL down to my VB.net application and that works fine, but it's ugly. I'd like...
2
by: ILCSP | last post by:
Hello, I'm in the process of changing our 'normal' Access 2000 update queries to Update Pass Through Queries. We have a SQL server 2000 database and we're using an Access 2000 database as our...
52
by: Neil | last post by:
We are running an Access 2000 MDB with a SQL 7 back end. Our network guy is upgrading to Windows Server 2003 and wants to upgrade Office and SQL Server at the same time. We're moving to SQL Server...
13
by: royaltiger | last post by:
I am trying to copy the inventory database in Building Access Applications by John L Viescas but when i try to run the database i get an error in the orders form when i click on the allocate...
3
by: mnjkahn via AccessMonster.com | last post by:
I'm running Access 2003, modifying a query that has over 45 fields. When I right click on the field name in Query Design View, and then click Build, Access crashes before the Build window...
6
by: jsacrey | last post by:
Hey everybody, got a secnario for ya that I need a bit of help with. Access 97 using linked tables from an SQL Server 2000 machine. I've created a simple query using two tables joined by one...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
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,...
0
tracyyun
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.