A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Criteria for select query.



 
 
Thread Tools Display Modes
  #1  
Old May 8th, 2010, 01:41 AM posted to microsoft.public.access.queries
Frank Martin
external usenet poster
 
Posts: 162
Default Criteria for select query.

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


  #2  
Old May 8th, 2010, 02:11 AM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Criteria for select query.

On Sat, 8 May 2010 10:41:41 +1000, "Frank Martin" 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]
  #3  
Old May 8th, 2010, 03:53 AM posted to microsoft.public.access.queries
Frank Martin
external usenet poster
 
Posts: 162
Default Criteria for select query.


"John W. Vinson" wrote
in message
...
On Sat, 8 May 2010 10:41:41 +1000, "Frank Martin"
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


 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:54 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.