perfectchaoss
Programmer
Hi,
I am currently trying to verify if a current Primary Key (UPC) is already in a database then return the status(1,2 or 3). I am using the Dlookup and the code looks like this.
UPCf = Me!txtUPC.Text
CheckUPC = DLookup("UPC", "dbo_NewItemList", UPC = UPCf)
I thought that this would set CheckUPC = UPC where UPC = my variable from the text box. However CheckUPC is always = to the first record in my database. Does anyone know why this is? Or if there is a better way to check the Database.
Thanks,
JF
I am currently trying to verify if a current Primary Key (UPC) is already in a database then return the status(1,2 or 3). I am using the Dlookup and the code looks like this.
UPCf = Me!txtUPC.Text
CheckUPC = DLookup("UPC", "dbo_NewItemList", UPC = UPCf)
I thought that this would set CheckUPC = UPC where UPC = my variable from the text box. However CheckUPC is always = to the first record in my database. Does anyone know why this is? Or if there is a better way to check the Database.
Thanks,
JF