I have checked the recordsource over and over again and I know its returning
data. I have executed the query in the in the query window and it does return
data.
Subform's dataEntry is set to NO. Link Master Fields and Link Child Fields
of the subform are set correctly. The recordsource of the subform is set like
this
Private Sub Form_Open(Cancel As Integer)
dim qry as string
qry = "SELECT tblCIPBudgetAccounts.CIP_ID,
tblCIPBudgetAccounts.BudgetItemID, tblCIPBudgetAccounts.AccountID, "
qry = qry & "tblCIPBudgetAccounts.AccountCIPAmount ,
tblCIPBudgetAccounts.AccountComments, tlkpAccounts.AccountName "
qry = qry & "from tlkpAccounts Inner join tblCIPBudgetAccounts "
qry = qry & "ON (tlkpAccounts.AccountID = tblCIPBudgetAccounts.AccountID) "
qry = qry & "WHERE CIP_ID ='" & Me.txtCIPID & "' and BudgetItemID = '" &
Me.txtBudgetItemID & "'"
Me![sfrmCIPBudgetAccounts].Form.RecordSource = qry 'sfrmCIPBudgetAccounts is
subform name
exit sub
Thanks
John W. Vinson said:
Check the recordsource! A blank subform means that two conditions are true: 1.
The recordsource doesn't contain any data, so you don't see any existing
records, and 2) it's a non-updateable query, so you don't see the new record
either. What's the Open() event? Why are you setting the recordsource there,
rather than having it be a parameter query, using the master/child link?
Perhaps you could post the code, and try opening the query in query datasheet
view. Maybe it's not giving you the recordset you expect!