J
Jan Il
Hi all Access 2002 XP - W2K
I am in need of adding a date sorting process to an existing filter form, to
sort groups of records by date. I have tried to set this up, however, as
it is not working properly, I don't know if it is in the query setup, in the
form itself, or the command button setup. While I have done a few of these
before, this type of query is a bit different for me, so I'm not really sure
if I am doing things right to not. The query works on it's own perfectly,
it is just in adding the date information that is causing the balk. When I
try to open the query, I get a Parameter Value box for the TxtDate1 and
TxtDate2, and it I click OK, it will open the query. However, when I go to
the filter form and enter dates into the respective date boxes, I get the
same Parameter Value boxes, and after clicking OK on both, the form opens
but there is no data. There are records for that dates entered.
Below is the SQL for the query the information is based on, and I would very
much appreciate it if someone would review the information and let me know
if I have entered something in this query for the date sorting incorrectly.:
SELECT T.BeginBal, T.CheckNo, T.DCP, T.CheckDate, T.Transaction,
T.CheckDCPAmt, T.DepositAmt, T.TransactionType, T.Comment, (SELECT
SUM(Nz(DepositAmt, 0) - Nz(CheckDCPAmt, 0) + Nz(BeginBal,0))
FROM MyCheckRegister T1
WHERE T1.CheckDate <= T.CheckDate) AS RunningBalance
FROM MyCheckRegister AS T
WHERE (((T.CheckDate) Between [Forms]![frmCheckRecFilter]![TxtDate1] And
[Forms]![frmCheckRecFilter]![TxtDate2])) OR
((([Forms]![frmCheckRecFilter]![TxtDate1]) Is Null)) OR
((([Forms]![frmCheckRecFIlter]![TxtDate2]) Is Null))
ORDER BY T.CheckNo, T.DCP, T.CheckDate;
Jan
Smiles are meant to be shared,
that's why they're so contagious.
I am in need of adding a date sorting process to an existing filter form, to
sort groups of records by date. I have tried to set this up, however, as
it is not working properly, I don't know if it is in the query setup, in the
form itself, or the command button setup. While I have done a few of these
before, this type of query is a bit different for me, so I'm not really sure
if I am doing things right to not. The query works on it's own perfectly,
it is just in adding the date information that is causing the balk. When I
try to open the query, I get a Parameter Value box for the TxtDate1 and
TxtDate2, and it I click OK, it will open the query. However, when I go to
the filter form and enter dates into the respective date boxes, I get the
same Parameter Value boxes, and after clicking OK on both, the form opens
but there is no data. There are records for that dates entered.
Below is the SQL for the query the information is based on, and I would very
much appreciate it if someone would review the information and let me know
if I have entered something in this query for the date sorting incorrectly.:
SELECT T.BeginBal, T.CheckNo, T.DCP, T.CheckDate, T.Transaction,
T.CheckDCPAmt, T.DepositAmt, T.TransactionType, T.Comment, (SELECT
SUM(Nz(DepositAmt, 0) - Nz(CheckDCPAmt, 0) + Nz(BeginBal,0))
FROM MyCheckRegister T1
WHERE T1.CheckDate <= T.CheckDate) AS RunningBalance
FROM MyCheckRegister AS T
WHERE (((T.CheckDate) Between [Forms]![frmCheckRecFilter]![TxtDate1] And
[Forms]![frmCheckRecFilter]![TxtDate2])) OR
((([Forms]![frmCheckRecFilter]![TxtDate1]) Is Null)) OR
((([Forms]![frmCheckRecFIlter]![TxtDate2]) Is Null))
ORDER BY T.CheckNo, T.DCP, T.CheckDate;
Jan
Smiles are meant to be shared,
that's why they're so contagious.