J
Jologs
I have tried numerous times and ways to do a dlookup within a subform. It
just doesn't work. I'm getting an error "you cancelled the previous
operation". All I want to do is show a staff's 'Section' then I select the
name from a combo box in the subform. Here is my syntax
Dim varX As Variant
Dim strCriteria As String
strCriteria = Me.cboAssignee
varX = DLookup("[strSection]", "tblEmployees", "[strAlias]=" & strCriteria)
Me.txtSection.Value = varX
I placed the code in the 'cboAssignee' after update event. I give up.
It works fine when I open the subform as a stand-alone using dlookup
formula. Please help.
just doesn't work. I'm getting an error "you cancelled the previous
operation". All I want to do is show a staff's 'Section' then I select the
name from a combo box in the subform. Here is my syntax
Dim varX As Variant
Dim strCriteria As String
strCriteria = Me.cboAssignee
varX = DLookup("[strSection]", "tblEmployees", "[strAlias]=" & strCriteria)
Me.txtSection.Value = varX
I placed the code in the 'cboAssignee' after update event. I give up.
It works fine when I open the subform as a stand-alone using dlookup
formula. Please help.