Enter New data event

L'apprentis

Redcifer
Local time
Yesterday, 23:11
Joined
Jun 22, 2005
Messages
177
Hi, I am not entirely sure where to look in the forum to answer this question, maybe someone can help me. I am just trying to create a simple code that would open a form if a user enter in a field a value that never has been entered before and open a other different form if the user enter a value already recorded. I can't find a 'not in recordset event', but there must be a way as when the form is set to Data entry with no duplicates an event occurs depending on the data being already recorded or not.
 
Hi L'apprentis,
You probably want to use the BeforeUpdate event of your control (TextBox?) to do a DCount() on the data you have. If it exists (DCount>0) then open one form and if it doesn't then open the other. You may want to rethink your form. I would use an UnBound TextBox for this type of operation. The duplicate Jet index value error is 3022 if you need it.
 
Cheers Rural Guy,
I see what you mean, This is a good idea.
 
Base the combo on a query that uses existing data, use the NotInList event of the combo to enter new records, there have been many examples posted here
 

Users who are viewing this thread

Back
Top Bottom