?
Solved

How do I use TrueFalse function in the argument where for a query

Posted on 2004-08-03
3
Medium Priority
?
238 Views
Last Modified: 2012-05-05
I have a form where user can input restriction.

Like "show me date from XXXXXX(input) to XXXXXX(input) "
Then I use what's in the form to query the database (table transaction) with the where argument

In the creation view of the query, I would like to use the WHERE argument and put something like

Field : .Transaction.TransactionDate
Table : Transaction
Order : ASC
Show : No
Where : TrueFalse(Form![formname]![fromdate] Is Null;Display All;>=Form![formname]![fromdate]) AND  TrueFalse(Form![formname]![todate] Is Null;Display All;<=Form![formname]![todate])

the default value of the field on the form is Null or "" or blank, I want the query to restrict to the input only if a value has been entered.
I have a number of input restriction but I just need to know the general idea of what it's suppose to look like.

Can someone help me with that?
0
Comment
Question by:BrunoTremblay
[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 26

Expert Comment

by:dannywareham
ID: 11707160
Enclose your query field with nz(query field)

This caputres all nulls
0
 

Author Comment

by:BrunoTremblay
ID: 11707273
and what does it do like, I'll look for it
0
 
LVL 44

Accepted Solution

by:
GRayL earned 2000 total points
ID: 11707828
Field: iif((Forms!FormName!FromDate + Forms!FormName!ToDate) is Null,"",
[TransactionDate] Between Forms!FormName!FromDate and Forms!FormName!ToDate)
Table: Transaction
 Order: ASC
Show: No
Criteria: <> False

I know it looks strange but it worked with my test case. I do not know if the todate and fromdate identifiers have to be wrapped in date delimteres (#). Try it this way first and if it doesn't work we can try the delimiters.
0

Featured Post

What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
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…
Suggested Courses

765 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