PC Review


Reply
Thread Tools Rate Thread

Criteria for select query.

 
 
Frank Martin
Guest
Posts: n/a
 
      8th May 2010
I have Access2003.

I need a criteria expression to select certain data from a
query QryLedgerTxns.

When the ledger is reconciled with the bank statement, that
statement date is manually entered into a QryLedgerTxns
field called "DateStatement".

The "DateStatement" field matches a ledger transaction field
called "Withdrawal"

My aim is to add up all the sums in the "Withdrawal" field
*not* reconciled with the bank statement.

The "Withdrawal" field is currency.
The "DateStatement" field is Date/time.

Therefore the criteria for the query should be like:

Exprn = if "DateStatement" = null.

This does not work. Can someone help me with the correct
expression?

Frank


 
Reply With Quote
 
 
 
 
John W. Vinson
Guest
Posts: n/a
 
      8th May 2010
On Sat, 8 May 2010 10:41:41 +1000, "Frank Martin" <(E-Mail Removed)> wrote:

>I have Access2003.
>
>I need a criteria expression to select certain data from a
>query QryLedgerTxns.
>
>When the ledger is reconciled with the bank statement, that
>statement date is manually entered into a QryLedgerTxns
>field called "DateStatement".
>
>The "DateStatement" field matches a ledger transaction field
>called "Withdrawal"
>
>My aim is to add up all the sums in the "Withdrawal" field
>*not* reconciled with the bank statement.
>
>The "Withdrawal" field is currency.
>The "DateStatement" field is Date/time.
>
>Therefore the criteria for the query should be like:
>
>Exprn = if "DateStatement" = null.
>
>This does not work. Can someone help me with the correct
>expression?
>
>Frank
>


Nothing (not even Null) is = to NULL. NULL means "this value is unknown,
unspecified, undefined" - so you cannot assert that NULL is either equal or
unequal to something else.

The proper criterion is

[DateStatement] IS NULL

In the query grid you'ld just put

IS NULL

on the Criteria line.
--

John W. Vinson [MVP]
 
Reply With Quote
 
Frank Martin
Guest
Posts: n/a
 
      8th May 2010

"John W. Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> wrote
in message
news:(E-Mail Removed)...
> On Sat, 8 May 2010 10:41:41 +1000, "Frank Martin"
> <(E-Mail Removed)> wrote:
>
>>I have Access2003.
>>
>>I need a criteria expression to select certain data from a
>>query QryLedgerTxns.
>>
>>When the ledger is reconciled with the bank statement,
>>that
>>statement date is manually entered into a QryLedgerTxns
>>field called "DateStatement".
>>
>>The "DateStatement" field matches a ledger transaction
>>field
>>called "Withdrawal"
>>
>>My aim is to add up all the sums in the "Withdrawal" field
>>*not* reconciled with the bank statement.
>>
>>The "Withdrawal" field is currency.
>>The "DateStatement" field is Date/time.
>>
>>Therefore the criteria for the query should be like:
>>
>>Exprn = if "DateStatement" = null.
>>
>>This does not work. Can someone help me with the correct
>>expression?
>>
>>Frank
>>

>
> Nothing (not even Null) is = to NULL. NULL means "this
> value is unknown,
> unspecified, undefined" - so you cannot assert that NULL
> is either equal or
> unequal to something else.
>
> The proper criterion is
>
> [DateStatement] IS NULL
>
> In the query grid you'ld just put
>
> IS NULL
>
> on the Criteria line.
> --
>
> John W. Vinson [MVP]



Thanks, this works great.
Frank


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Criteria for a Select Query Chris Microsoft Access Queries 6 26th Oct 2009 06:58 PM
IN SELECT Query Criteria =?Utf-8?B?Q3lkbmV5?= Microsoft Access Queries 9 28th Sep 2007 06:02 PM
select query criteria =?Utf-8?B?V2VuZHk=?= Microsoft Access Form Coding 6 5th Feb 2007 10:37 PM
Help with criteria on select query graeme34 via AccessMonster.com Microsoft Access Queries 13 6th Apr 2006 03:19 AM
Select query criteria =?Utf-8?B?QnJ1Y2Vscw==?= Microsoft Access Queries 3 11th Jul 2005 09:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:38 AM.