query problem

qaccess

Registered User.
Local time
Yesterday, 21:46
Joined
Aug 7, 2004
Messages
29
I made a query with several columns. I like to view only the records based on a query criteria of two columns.

column1 column2
text1 text5
text3 text1
text4 text6

when i fill in criteria text1 for column 1 and column2 . Nothing showed up. How can I only show rows that contains text1 based on tho columns criteria
 
Query bases on two columns criteria

I put an attachment with a access database. The query has to show only records containing text1. But now it doesn't show.
 

Attachments

You are trying to find ALL records where BOTH fields are equal to text1.

When you place criteria on the same line then that is an AND.
You should move the second criteria down one line to make an OR criteria.
 
This works

Use use this in sql statement in dreamweaver and it works. but how get i this to work in access

SELECT *
FROM qr
WHERE (column1='text1' OR column2='text1') AND seasonID = varSeason AND clubID = varClub
 
ThanXs SJ Mc Abney

Thanxs SJ Mc Abney it works now in access. I put in Criteria column1 "text1" and in OR column2 "text1"

now i get

column1 column2
text1 text3
text2 text1

Life is simple
 

Users who are viewing this thread

Back
Top Bottom