Control Won't Requery

  • Thread starter Thread starter Brennan
  • Start date Start date
B

Brennan

Hello:

I have a main form called Statements and a sub-form on the
main form named statement details. This is an Access 2k
Database running on Win2k

The sub-form has a combobox on it named Accounts. The
accounts combo has a query as it's rowsource. The sql for
the query is as follows:

SELECT [tblAccounts].[tblAccounts_AccountID],
[tblAccounts].[tblAccounts_AccountName], [tblAccounts].
[tblAccounts_AccountNum], [tblAccounts].
[tblAccounts_SaleAmount], [tblAccounts].
[tblAccounts_ClientID], [tblAccounts].
[tblAccounts_PmntDate]
FROM tblAccounts
WHERE ((([tblAccounts].[tblAccounts_ClientID])=[Forms]!
[frmStatments]![cboStmntClientID]) And (([tblAccounts].
[tblAccounts_PmntDate]) Between [Forms]![frmStatments]!
[tblStmnt_StmntDate] And [Forms]![frmStatments]!
tblStmnt_StmntEndDate))
ORDER BY [tblAccounts].[tblAccounts_AccountName];

My problem is that when I enter in my dates onto the main
form, the combobox doesn't populate with any data. If I
go into design view and then back to form view, the the
combobox populates properly.

I tried to address the issue by having the control requery
itself in a BeforeUpdate event. That didn't work. I also
tried to have the control requery itself using an OnChange
event on the Statment end date text box.

That didn't work either.

Any comments or suggestions would be appreciated.

Thanks,
Brennan
 
Back
Top