FuzMic
DataBase Tinker
- Local time
- Today, 19:47
- Joined
- Sep 13, 2006
- Messages
- 744
Hi everybody out there!
I think this a very interesting issue to tinker with.
The circumstances of the problem is as follows:
C1. System is xp office sp3 in xp win sp2
C2. A number of forms in msAccess has a Cancel = True in the "Form Before Update" event at the occurence of some validation failures.
C3. When the validation failed, a docmd.gotoControl "ctrlName" follows.
C4. Some Exit field event codes exist but it should be occur before or after "Form Before Update event"
C5. The problem manifest itself particularly if it is a SubForm Before Update event.
The problem
P1. Error of missing name of "ctrlName" or goto action is not available now. (Form Event Error 2046)
But....
B1. Once the error occurred, it will not occur again after debug.
B2. If form is imported into another .db, problem occur again & resolved itself as stated in B1.
B3. Use docmd.CancelEvent seems to be exactly the same as using Cancel = True
Temporary Resolution:
Use "On Error resume next" or forget abt gotoControl will hide the problem.
Any Views to shared ? Is this a bug in Access or I missed out something? Because the problem is intermittent, I did not realized this this bug for a number of years on a many forms until I accidentally found it.
HELP!!!
Thanks & Cheers!
I think this a very interesting issue to tinker with.
The circumstances of the problem is as follows:
C1. System is xp office sp3 in xp win sp2
C2. A number of forms in msAccess has a Cancel = True in the "Form Before Update" event at the occurence of some validation failures.
C3. When the validation failed, a docmd.gotoControl "ctrlName" follows.
C4. Some Exit field event codes exist but it should be occur before or after "Form Before Update event"
C5. The problem manifest itself particularly if it is a SubForm Before Update event.
The problem
P1. Error of missing name of "ctrlName" or goto action is not available now. (Form Event Error 2046)
But....
B1. Once the error occurred, it will not occur again after debug.
B2. If form is imported into another .db, problem occur again & resolved itself as stated in B1.
B3. Use docmd.CancelEvent seems to be exactly the same as using Cancel = True
Temporary Resolution:
Use "On Error resume next" or forget abt gotoControl will hide the problem.
Any Views to shared ? Is this a bug in Access or I missed out something? Because the problem is intermittent, I did not realized this this bug for a number of years on a many forms until I accidentally found it.
HELP!!!
Thanks & Cheers!