Fireman1143
IS-IT--Management
Having a DLOOKUP issue where it constantly returns a null value.
I have the following code on my form and the first part does work:
Private Sub cboApptVehicleYMM_AfterUpdate()
Me.txtVehicleMakeModel = Trim(Mid([ApptVehicleYMM], 6)) ' This Works
Me.txtSvcPriceCode = DLookup("[ST_PricCode]", "qryApptPricCode", "Trim([ST_Make_Model]) = 'Trim(Mid(Me.[ApptVehicleYMM], 6))'")
End Sub
The qry is qryApptPricCode with two fields (both txt):
ST_Make_Model
ST_PricCode
I used the Trim function on the [ST_Make_Model] as I found some input had a space or two at the end, I figured this would eliminate that.
Thanks
Mike
I have the following code on my form and the first part does work:
Private Sub cboApptVehicleYMM_AfterUpdate()
Me.txtVehicleMakeModel = Trim(Mid([ApptVehicleYMM], 6)) ' This Works
Me.txtSvcPriceCode = DLookup("[ST_PricCode]", "qryApptPricCode", "Trim([ST_Make_Model]) = 'Trim(Mid(Me.[ApptVehicleYMM], 6))'")
End Sub
The qry is qryApptPricCode with two fields (both txt):
ST_Make_Model
ST_PricCode
I used the Trim function on the [ST_Make_Model] as I found some input had a space or two at the end, I figured this would eliminate that.
Thanks
Mike