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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
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 …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

777 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