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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

920 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

15 Experts available now in Live!

Get 1:1 Help Now