Criteria for select query.

F

Frank Martin

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
 
J

John W. Vinson

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.
 
F

Frank Martin

in message
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.


Thanks, this works great.
Frank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top