L
Len B
I have a couple of general questions about VBA.
Is there a way to single step through the start-up code of an application?
Effectively, what I am looking for is a setting somewhere that will set a
breakpoint at the very first line of code, allowing me to single step from
there when I first launch the application.
Secondly, is there a resource which will tell me in what order SUBs will be
executed? Obviously, for a form, OnActivate will execute before OnCurrent
but the order for others is not so apparent.
I have often wondered about execution order but what brought this to a head
was that I was editing a form (the start-up form Assets) containing a
DateSold text control and a Status combo control (to select from InService,
Inactive and Sold). I added AfterUpdate code to each.
For the DateSold it set the combo to sold.
For the combo I sent the cursor to the DateSold field if it was blank.
Now when the application launches, I am confronted with a series errors,
none of which refer to selling an asset. A dialog box demands a value for
Forms!Assets!AssetID. Humouring it with a valid value results in Runtime err
40036. Choosing Debug opens the code window in the IsLoaded function... etc.
etc.
I want to be able to see, step by step, what is happening. I cannot believe
my AfterUpdate code is at fault because I commented it out but still the
errors come.
TIA
Is there a way to single step through the start-up code of an application?
Effectively, what I am looking for is a setting somewhere that will set a
breakpoint at the very first line of code, allowing me to single step from
there when I first launch the application.
Secondly, is there a resource which will tell me in what order SUBs will be
executed? Obviously, for a form, OnActivate will execute before OnCurrent
but the order for others is not so apparent.
I have often wondered about execution order but what brought this to a head
was that I was editing a form (the start-up form Assets) containing a
DateSold text control and a Status combo control (to select from InService,
Inactive and Sold). I added AfterUpdate code to each.
For the DateSold it set the combo to sold.
For the combo I sent the cursor to the DateSold field if it was blank.
Now when the application launches, I am confronted with a series errors,
none of which refer to selling an asset. A dialog box demands a value for
Forms!Assets!AssetID. Humouring it with a valid value results in Runtime err
40036. Choosing Debug opens the code window in the IsLoaded function... etc.
etc.
I want to be able to see, step by step, what is happening. I cannot believe
my AfterUpdate code is at fault because I commented it out but still the
errors come.
TIA