Hello Everyone, I am trying to get this code to work and would like and suggestions. I have a form InvestigatorDE with an unbound text field named Industry and a bound textbox named IndustryCode were users enter the industry code. I also have another table named 2012IndustryCode which contains the various codes and industry titles. I would like to have the Industry title appear in the unbound Industry textbox once a user enters the industry code in the IndustryCode field. I have tried a dlookup and get a data mismatch error.
Here's one of the codes i've tried:
Private Sub CONTACT_GotFocus()
Dim IndustryListing As String
Industry = DLookup("[NAICSTitle]", "2012IndustryCodeTable", "[NAICSCode] =" & Forms![InvestigatorDE]!INDUSTRYCODE)
End Sub
All of the fields are set as Text.
Any assistance is appreciated, Thanks.
Here's one of the codes i've tried:
Private Sub CONTACT_GotFocus()
Dim IndustryListing As String
Industry = DLookup("[NAICSTitle]", "2012IndustryCodeTable", "[NAICSCode] =" & Forms![InvestigatorDE]!INDUSTRYCODE)
End Sub
All of the fields are set as Text.
Any assistance is appreciated, Thanks.