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!

Parameter Query returns blank results and correct results

Status
Not open for further replies.

stru

Programmer
Mar 23, 2002
10
US
Hi,

I have a parameter query that works to a point. There are 5 parameters. My problem is that when I enter a parameter, say Vendor, the result not only pulls up all of the records that match that Vendor, but also any records where Vendor is blank. I believe these blank records are zero length and not null. I cannot figure out why the query is returning these records in addition to the correct ones. In the query, my Expression for the criteria for each parameter is essentially (different txtbox for each, of course)

[Forms]![frmDate]![txtVendor] Or [Forms]![frmDate]![txtVendor] Is Null

I am not having a porblem leaving any parametetrs blank as many seem to have encountered.

Any help would be appreciated. Thanks a lot.

Dan
 
Why are you asking for null vendors?
Or [Forms]![frmDate]![txtVendor] Is Null
This would give all the null vendor records.
 
It is "Or Is Null" because there are 5 different criteria. So, the Vendor text box on the criteria form will often be empty. Is isn't saying pull Null Vendors.
 
You may need to take a different approach. Can you show the where clause in your stored procedure and the parameter list so we don't need to guess at what you are doing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top