Some Help please - Rolling back changes / cancelling (1 Viewer)

hully333

Registered User.
Local time
Today, 12:53
Joined
Feb 7, 2008
Messages
18
Hi,
I hope someone can help point me in the right direction.

I have a form that has numerous bound lookup controls on it.
If on a new record and i type in data that is not verified in a lookup combo box i get an error that states this....fine thats how i want it as u can only select data that is in the lookup table, so it needs to be added (in another form for that table) and there is a provision in place for this. If i then delete the text that was typed and try to tab away from the combo box or use a combo button to try and open another form i get an error saying its trying to set a null value to a varible thats not a variant. Ok fine thats expected at this stage, but undesirable.

My goal is to cancel any change on the form and be able to either close the form, or navigate away from the combo box by tabbing or using the combo button that opens my other form that adds data to the "looked up table" without the error appearing repeatedly. Right now an entry has to be selected temporarily to enable me to go and add the new entry to return to the form to then select that new entry.

This isnt ideal and i have tried all sorts of methods except the correct one. I just dont seem to be able to force the closure of the form except using the X button to close it after getting the error and ok'ing the lost changes notification.

Any help will be appreciated.

regards

Simon
 
Last edited:

KenHigg

Registered User
Local time
Today, 07:53
Joined
Jun 9, 2004
Messages
13,327
I've never used it but you may be able to use the 'Transaction' statement / method(s).
 

!Blue

Registered User.
Local time
Today, 12:53
Joined
Jul 4, 2008
Messages
28
Have you tried 'Ctl Z' to undo the change..?
 

hully333

Registered User.
Local time
Today, 12:53
Joined
Feb 7, 2008
Messages
18
Have you tried 'Ctl Z' to undo the change..?

Haha, excellent, learn something new every day. Yes that resolves the issue.

Also, Is there a programmatical version of 'Ctrl Z'

Regards

Simon
 

Users who are viewing this thread

Top Bottom