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
374 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
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

708 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now