Hi all,
I am having a problem with a line of code in access vba. I am trying to use the DLookup function to check whether or not a record already exists with a dealer name. Once I know if it exists or not, later on in the code I will run some sql to either insert a new record or update an existing record. But, I am getting a syntax error that says I am missing an operator. I have googled around but to no luck, any help would be much appreciated.
The line of code I am having trouble with is...
DealerBiz is the field I want to search through within the Dealer_Table, and I want to look for a match of the Me!Dealer box within the DealerBiz field.
I have tried messing around with the syntax any way that my little access knowledge could come up with but no such luck. Once again, any help or direction would be greatly appreciated.
Thank you!
I am having a problem with a line of code in access vba. I am trying to use the DLookup function to check whether or not a record already exists with a dealer name. Once I know if it exists or not, later on in the code I will run some sql to either insert a new record or update an existing record. But, I am getting a syntax error that says I am missing an operator. I have googled around but to no luck, any help would be much appreciated.
The line of code I am having trouble with is...
Code:
dtest = DLookup("[DealerBiz]", "[Dealer_Table]", "[DealerBiz] =" & Me!Dealer)
I have tried messing around with the syntax any way that my little access knowledge could come up with but no such luck. Once again, any help or direction would be greatly appreciated.
Thank you!
Comment