Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
385 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 1000 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 1000 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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

660 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