[AccessD] Help on Complicated record count query

Hale, Jim Jim.Hale at FleetPride.com
Thu May 27 11:41:25 CDT 2004


Using Monarch I have successfully parsed a bank statement file (6620
records) into Access. Unfortunately deposits and withdrawals are both
positive numbers. The problem I am having is determining where withdrawals
begin so that I can flip the sign. Below are the relevant fields.
SELECT tblBankStmt.fldDate, tblBankStmt.fldAmt, tblBankStmt.fldCustref,
tblBankStmt.fldDescr
FROM tblBankStmt;

fldate is actually a text field with "04/01" - "04/30". Deposits are listed
first with 4/1-4/30 in order. The withdrawals start over with 4/1. There is
nothing in the table to distinguish where withdrawal records start except
that the date changes from 4/30 on the last deposit item back to 4/1 on the
first withdrawal item. So I need an SQL criteria (or maybe an iif stmt on
the amt field) that counts the number of deposit records and flips the sign
on every record after that. I do not khow to do this so any help would
appreciated. TIA

Jim Hale



More information about the AccessD mailing list