Solved

1) Wildcard in Query form a textbox form- some null values. 2) Hide Report Details section based on Form input yes or no

Posted on 2004-08-11
3
381 Views
Last Modified: 2006-11-17
1)  I have a database that I have written a Report that calls a Form that runs a Query.   The query looks at a date range (range is supplied on Form by user), Event (Supplied on Ofrm by user, and Mailbox numebr (to be supplied on Form by user).  I can get this to run correctly using the date range and event selection.  I cna not get it to run with the mailbox in anywya or form.  the mailbox field CAN have null items.  I tried IIf(ISNull([table].[mailbox])=True," ",[table].[mailbox]) in the Field box of the query wiht Like [Froms]![formname]![mailbox] in the Criteria and a default value of ="*" in the Form.  I get nothing in the data and also prompted for the Mailbox value.  I also do not wnat to have to input anything for the mailbox value (find all records meeting the other criteria.  Any suggestions?

2)  the other thing I am trying to do is put an option on the Form to hide the details on teh Reprot and jsut show the sumamry count.  The count works, but can't figure out how to make the detail section hide if a radio button is selected on the Form.  Need this due to amoutn of detail for some reports.

Thanks!
0
Comment
Question by:DayneJake
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 10

Assisted Solution

by:RichardCorrie
RichardCorrie earned 250 total points
ID: 11779095
try:
1)query SQL
Select .... Where ([Table].Mailbox = [Forms]![formname]![mailbox] or [Forms]![formname]![mailbox] is null) and ([Table].Eventdate between [Forms]![formname]![fromdate] and [Forms]![formname]![todate] ) and ([Table].Event = [Forms]![formname]![Event])

2)
in the Details Format event out

if [Forms]![formname]![chkHideDetail] then
  Cancel = true
end if

/Richard
0
 
LVL 3

Accepted Solution

by:
BrentTemple earned 250 total points
ID: 11779403
For number 1)  

You tried this:
"Like [Forms]![formname]![mailbox] in the Criteria and a default value of ="*" in the Form"

Try this:
Like nz([Forms]![formname]![mailbox],"*") in the Criteria, and don't worry about the default value in the form.

-Brent
0
 

Author Comment

by:DayneJake
ID: 11783996
I ended up using the answer to 2 from Richard and the answer to 1 from Brent.  Great Job Guys! Thanks!
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question