New to Access, and ran into an issue when I tried to create a DLookUp for an Issue form I've made.
I am trying to get it so that when the RentalCode for a product is updated all of the other information on the form will be filled in accordingly (in this case, stock rental table information). My first attempt was to get the Title to appear when the rental code is typed in.
Here is the Code that I've tried:
Private Sub RentalCode_AfterUpdate()
Title = DLookup("Title", "Stock", "RentalCode=" & RentalCode)
End Sub
After setting this up, I had a run time error thrown back stating the following.
"Runtime error 2471
The expression you entered as a query parameter produced this error 'RE00014'"
To save confusion RE00014 is the identifier allocated to the DVD title in question.
When I ran the debug to find why the Rental Code was causing an issue I found that the Title was returning a Null value. The Debugger wasn't very helpful and I'm still left clueless as to what is going on. Any suggestions?
I've check the field names are all spelt correctly by the way.
I am trying to get it so that when the RentalCode for a product is updated all of the other information on the form will be filled in accordingly (in this case, stock rental table information). My first attempt was to get the Title to appear when the rental code is typed in.
Here is the Code that I've tried:
Private Sub RentalCode_AfterUpdate()
Title = DLookup("Title", "Stock", "RentalCode=" & RentalCode)
End Sub
After setting this up, I had a run time error thrown back stating the following.
"Runtime error 2471
The expression you entered as a query parameter produced this error 'RE00014'"
To save confusion RE00014 is the identifier allocated to the DVD title in question.
When I ran the debug to find why the Rental Code was causing an issue I found that the Title was returning a Null value. The Debugger wasn't very helpful and I'm still left clueless as to what is going on. Any suggestions?
I've check the field names are all spelt correctly by the way.