P
Patti
Hi!
I'm trying to autofill a form using Dlookup and it's not
working. The controlling field is cmbRFCE. In the
AfterUpdate field, I have the following:
Private Sub cmbRFCE__AfterUpdate()
[cmbProject] = DLookup("[Project]", "tblRFCE", "[RFCE]=" &
[Forms]![PO]![cmbRFCE])
[cmbDept] = DLookup("[Dept]", "tblRFCE", "[RFCE]=" &
[Forms]![PO]![cmbRFCE])
End Sub
It doesn't give me any errors, but the cmbProject and
cmbDept fields don't populate. In those combo boxes, the
rowsourcetype is set to Table/query and the row source is
a query: SELECT tblRFCE.[Project] FROM tblRFCE WHERE
(((tblRFCE.[RFCE])=[Forms]![PO]![cmbRFCE])); The Dept
combo box has the same query but it selects tblRFCE.[Dept]
What am I doing wrong?
I'm trying to autofill a form using Dlookup and it's not
working. The controlling field is cmbRFCE. In the
AfterUpdate field, I have the following:
Private Sub cmbRFCE__AfterUpdate()
[cmbProject] = DLookup("[Project]", "tblRFCE", "[RFCE]=" &
[Forms]![PO]![cmbRFCE])
[cmbDept] = DLookup("[Dept]", "tblRFCE", "[RFCE]=" &
[Forms]![PO]![cmbRFCE])
End Sub
It doesn't give me any errors, but the cmbProject and
cmbDept fields don't populate. In those combo boxes, the
rowsourcetype is set to Table/query and the row source is
a query: SELECT tblRFCE.[Project] FROM tblRFCE WHERE
(((tblRFCE.[RFCE])=[Forms]![PO]![cmbRFCE])); The Dept
combo box has the same query but it selects tblRFCE.[Dept]
What am I doing wrong?