Mark Liddle
06-20-2001, 09:46 PM
In what order, are events processed ?
I have an event on a field that must check the following.
1. Is there data in the field (I have placed this in the "Lost Focus" event)
2. If there is data, then generate an account code. (This has been placed in the "After_Update" event.
3. I also want to place code in the "Double_Click" event.
What If I placed checks, balances and other code in other events ? What is processed first ?
Fornatian
06-21-2001, 08:36 AM
Mark, try this link and download the EventsAndWhen database that I knocked up, should be of some assistance:
http://www3.sympatico.ca/qaissuper/Index.html
let me know if it was any help.
Ian
Mark Liddle
06-22-2001, 04:42 AM
Hi Ian
Very interesting stuff. (At least for where I am at now.) - Thanks.
It certainly does answer SOME questions.
What I haven't found an answer to yet (Unless I have mis-read something or not read the relevant piece yet) is...
If I have 2 (or more events) as follows.
After Update
Do X,Y and Z
On Exit
Print a report
On lost Focus
Do A,B and C
Which of these is evaluated first.
As I understand it, the "On Exit" event occurs before the "Lost Focus".
Both the "After Update" and "On Exit" events are evaluated when the control loses focus, but in what order ?
Also, if the "After Update" fires first, will it fire before or after the "On Exit" event ?
Thanks for your input.
chrisk
06-22-2001, 05:24 AM
Mark
This, at least, is something that Access 'help' does actually help with. Search for "find out when events occur" in the answer wizard and select "See the order of events for controls on forms". I've got A2k now, but I know it's in A97 help too.
Chris.
D-Fresh
06-22-2001, 05:45 AM
And of course the other solution being to throw some test lines in there. Create a form and put the control you want to find out the order. In each event you're looking for put a msgbox stating which event just fired, i.e. msgbox "Lost Focus" in the LostFocus event. Kind of a cheap way to do it, but it works. Hope that helps.
Doug
Mark Liddle
06-23-2001, 01:36 AM
Thanks for your comments gents.
I guess I'm still thinking too much IN the box.