Bob Heygood
bheygood at abestsystems.com
Tue May 17 17:28:12 CDT 2005
Sorry, I seem to have botched the stating of the problem. I am using a form with a list box and a text box and a button. My objective is to choose one or more values from the list box and thru code place the values into the text box. The text box is referenced by the criteria in a query underlying a report. All is well until I choose more than one value/record. BTW this is a string value. I have used just the raw values and also used the IN(XXXX,XXX) function. Works great with just ONE value selected from the list box. But when choosing more than one the query bombs and the report returns no records. -----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