VBA to avoid duplicate supplies item

you just change txt_ItemCode in the code with ItemCode.
you also need to Rebuild your BeforeUpdate event since the event is for
txt_ItemCode and not for ItemCode textbox.
As simple as that?, will it not confused because the name of the form field is the same as the name of the table field?.

Thank you,

Frank
 
Use Me. In the code Access will then know you are talking about the control, not the field.
 
you just change txt_ItemCode in the code with ItemCode.
you also need to Rebuild your BeforeUpdate event since the event is for
txt_ItemCode and not for ItemCode textbox.

Thank you Arnel, it works perfectly. I did it on my testing database.

Thank you very much

Frank
 
Last edited:
you just change txt_ItemCode in the code with ItemCode.
HI Arnel,
In reference to Pat's comment about RI ( Referential Integrity) in my database, I want to try to change the control name to be "txt_ItemCode". But since my database is already go live since Mar 2021. What do you think that I am so careful in order not to have a problem on my database.

My testing database is non split one, while I have made much form modifications in my live database ( the split one). Can I import the forms & Reports from my live database and replace it?, I think this is the best way.

Thank you for your advice.

Frank
 

Users who are viewing this thread

Back
Top Bottom