W
winsa
Hi
I have a form (frm_RECEIPTS) which records a cash receipts transaction. The
subform (sbfrm_RECDETAILS) lists invoices paid. Both forms linked by TRANS_NO.
I have a combo box (cbo_DEBTOR) on frm_RECEIPTS, which controls a combo box
(cbo_REF) on the subform using the following code in the AfterUpdate event:
Forms!frm_RECEIPTS.sbfrm_RECDETAILS.Form!cbo_REF.RowSource = "SELECT
MST_TRANS_IDX, MSTRACC_REF AS Ref, TRANS_DATE As Date, AMOUNT As Amount,
OUTSTANDING As Outstanding, NARRATIVE, TYPE, DEBTOR_IDX FROM tbl_MSTRACC
WHERE (TYPE = 'INV' OR TYPE = 'CRE') AND OUTSTANDING <> 0 AND DEBTOR_IDX = "
& Me!DEBTOR_IDX
Forms!frm_RECEIPTS.sbfrm_RECDETAILS.Form!cbo_REF.Requery
This seems to work fine as cbo_REF is showing the correct invoices according
to whichever Debtor is chosen in cbo_DEBTOR.
My problem is that whenever I open the form, the subform remains blank until
I rechoose the debtor (which does show correctly when the form is opened),
and then the invoice details appear. When I move to the next record, again
the subform is blank until I rechoose the debtor, and the invoices lines
reappear. However, going back to the first record, the subform is blank
again. I can't seem to get the subform details to appear and remain.
Can anyone help me here? Detailed help would be good as I'm a novice at
Access.
Thanking you in advance
Winsa
I have a form (frm_RECEIPTS) which records a cash receipts transaction. The
subform (sbfrm_RECDETAILS) lists invoices paid. Both forms linked by TRANS_NO.
I have a combo box (cbo_DEBTOR) on frm_RECEIPTS, which controls a combo box
(cbo_REF) on the subform using the following code in the AfterUpdate event:
Forms!frm_RECEIPTS.sbfrm_RECDETAILS.Form!cbo_REF.RowSource = "SELECT
MST_TRANS_IDX, MSTRACC_REF AS Ref, TRANS_DATE As Date, AMOUNT As Amount,
OUTSTANDING As Outstanding, NARRATIVE, TYPE, DEBTOR_IDX FROM tbl_MSTRACC
WHERE (TYPE = 'INV' OR TYPE = 'CRE') AND OUTSTANDING <> 0 AND DEBTOR_IDX = "
& Me!DEBTOR_IDX
Forms!frm_RECEIPTS.sbfrm_RECDETAILS.Form!cbo_REF.Requery
This seems to work fine as cbo_REF is showing the correct invoices according
to whichever Debtor is chosen in cbo_DEBTOR.
My problem is that whenever I open the form, the subform remains blank until
I rechoose the debtor (which does show correctly when the form is opened),
and then the invoice details appear. When I move to the next record, again
the subform is blank until I rechoose the debtor, and the invoices lines
reappear. However, going back to the first record, the subform is blank
again. I can't seem to get the subform details to appear and remain.
Can anyone help me here? Detailed help would be good as I'm a novice at
Access.
Thanking you in advance
Winsa