I am trying to use the Lookup function to retrieve the description form the table tCodes and apply the description value in the description box in the form tDes with the After Update
For example if the users types any number between 100 and 199 in the Code field, the Description is populated with THALES as the number entered is between 100 and 199 and so on
I used the below code but I am not able to complete the VBA code
For example if the users types any number between 100 and 199 in the Code field, the Description is populated with THALES as the number entered is between 100 and 199 and so on
I used the below code but I am not able to complete the VBA code
Code:
Private Sub Code_AfterUpdate()
Description = DLookup("Description", "tCodes", "Code='" & CodeFrom & "'")
End Sub