G
Guest
I have a question regarding DLookup - I have set my form up so that when a
MISNumber is populate the RptName should automatically populate with the
report that is associated with the MISNumber. Everytime I run it I get a
Debug error. This is the information that I have associated with the after
update of the MISNumber
Private Sub cboMISNumber_AfterUpdate()
Me.txtRptName = DLookup("[RptName]", "[tblCorrWork]",
"[MISNumber]='" & Me.cboMISNumber & "'")
Me.txtRptName = DLookup("[RptName]", "[tblQueueWork]",
"[MISNumber]='" & Me.cboMISNumber & "'")
End Sub
The debug error highlights the whole first line. Can someone please tell me
what I may be doing wrong. I have this code in other forms that I have
created and it works fine.
Thank you
MISNumber is populate the RptName should automatically populate with the
report that is associated with the MISNumber. Everytime I run it I get a
Debug error. This is the information that I have associated with the after
update of the MISNumber
Private Sub cboMISNumber_AfterUpdate()
Me.txtRptName = DLookup("[RptName]", "[tblCorrWork]",
"[MISNumber]='" & Me.cboMISNumber & "'")
Me.txtRptName = DLookup("[RptName]", "[tblQueueWork]",
"[MISNumber]='" & Me.cboMISNumber & "'")
End Sub
The debug error highlights the whole first line. Can someone please tell me
what I may be doing wrong. I have this code in other forms that I have
created and it works fine.
Thank you