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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

linking forms and queries

Status
Not open for further replies.

rstrsac

IS-IT--Management
Joined
May 12, 2005
Messages
4
Location
US
I needed a report based on a query and wanted users to be able to edit the query without being in design view. I then made a form with 2 text boxes (becuase there are 2 fields that are typically modified) and built an expression in the query criteria field acordingly. This works fine when both boxes are filled in, but when I only want to use one of the 2 criteria boxes I get nothing but error on my report. Any ideas?
 
Can you please post the contents of your criteria cells ?
Usually:
Like [Forms]![parameter form]![textbox] & '*' Or [Forms]![parameter form]![textbox] Is Null

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Sure, in one field I have: [Forms]![Flash Report]![WeekQueryTB] (This one filters by week) and in the second field I have [Forms]![Flash Report]![PeriodQueryTB] (This one filters by Period). All other fields criteria is empty.
 
= [Forms]![Flash Report]![WeekQueryTB] Or [Forms]![Flash Report]![WeekQueryTB] Is Null

= [Forms]![Flash Report]![PeriodQueryTB] Or [Forms]![Flash Report]![PeriodQueryTB] Is Null

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Works perfectly. Thanks alot!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top