Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Where in a QBE Query

Status
Not open for further replies.

dabowles

MIS
Jun 26, 2001
64
US
Hi,
I am trying to write a query for a report. There might be an easier way to do this but this is the only way I can think of it. I have 4 fields that I am querying on. Code, Number of Hours, Location, Number Of Hours. Now the Number of Hours are both for the same field. Let me explain, I want to query the all of the codes I specify from the records, inside each record I pull a code for I want to also query the Number of Hours in that field. Then I want to query in those records the Location the Hours took place. Then I want to query the Number of Hours again but this time I want to put a criteria on it. I only want to query The Number of Hours where Location is equal to a specific criteria I give it. Now I figured in QBE I could go under the second Column for Number of Hours and put WHERE [Location] = &quot;Other Community Location&quot; <-where that is the string I am looking for. Instead it puts quotes around everything. How can I specify for it to query the Number of Hours a second time and only return entries where Location is equal to what I put in &quot; &quot;'s and if it doesn't equal that to leave it null?

Thanks,
David
 
Try just putting in what you did, without the WHERE in front. Access will add the where automatically for you.

HTH Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top