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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|