[AccessD] query criteria

Bob Heygood bheygood at abestsystems.com
Tue May 17 22:25:17 CDT 2005


Susan,

no, I was trying to use a value in a text box on a form to provide criteria
for a query that is the source of a report.
this worked fine until I tried to use more than one value.

I have since aborted and used the where argument in the openreport method of
the docmd...

I am sure it was all about how a string gets "pasted" into the criteria of a
saved query as opposed to a numeric value.

thanks for responding..


bob

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Susan Harkins
Sent: Tuesday, May 17, 2005 2:55 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] query criteria


You're grabbing two criteria values from an open form from a fixed query?

Susan H.

I should have been clear.
The reference to the form textbox is in the query grid.
So I think that all I need is the values not the "xxxx =".

Can I "Debug" the query somehow? And see what is being supplied for
criteria?


Sorry if I did not include that before.

thanks again.


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Susan Harkins
Sent: Tuesday, May 17, 2005 2:40 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] query criteria



Insert a Debug.Print statement in the right spot so you can read the
evaluated criteria component. You're probably getting something like

Field = "xxx" Or "xxx"

You need:

Field = "xxx" Or Field = "xxx"

Susan H.

Hello to the list,
Why might I not get any results from a query that uses a text box on a open
form for one of the criteria for one the query's fields?

I can type the same text into the criteria myself and the query returns the
proper set.

BTW, this only goes bad when using more than one value. These are text
types.

Example:
Works in grid:
"0232"
"0232" Or "0224"

Works in Form textbox:
0224

No work in Form textbox:
0224 or 0232
"0224" or "0232"

TIA,

Bob Heygood


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list