ya5irha55an
Registered User.
- Local time
- Today, 08:31
- Joined
- Sep 20, 2005
- Messages
- 20
Hi,
I have a form which is linked to a table. The table contains the field 'Code'. The form is used for entering data into the table. I would like to write some code so that when the 'Code' field is filled in, it checks if this code already exists in the table, and if it does a message comes up and blocks the entry of the data in 'code', otherwise it allows the code to be entered.
I am familiar with dlookup, but have not used it in a vba code before- i am guessing that this is the right function to get what i want. Can anyone help?
I have a form which is linked to a table. The table contains the field 'Code'. The form is used for entering data into the table. I would like to write some code so that when the 'Code' field is filled in, it checks if this code already exists in the table, and if it does a message comes up and blocks the entry of the data in 'code', otherwise it allows the code to be entered.
I am familiar with dlookup, but have not used it in a vba code before- i am guessing that this is the right function to get what i want. Can anyone help?