[access 2007] event doesn't happen

serbring

Registered User.
Local time
Today, 04:38
Joined
Dec 7, 2008
Messages
17
I have created a small db with a form. I'd like maximize the form when is started. So on the "On Load" form Event property i have putted the command

DoCmd.Maximize

but when the form is loaded the on load sub procedure isn't called. I have tried to put a breakpoint in the sub. None form event procedure isn't called. I have just enabled Macro VBA procedure.

Thank you
 
The chance of a form loading without the OnLoad event firing is just simply non-existant. Something else is going on.
 
Everything is now in a trusted location, correct?
 
there is an option in A2007 to show all forms in a sort of "tabbed" manner. I would think this overrides a maximise setting. Is this possibly happening?
 
Wouldn't it have to be in the on open anyway?
 
Try it in the on open event instead then and see how you get on I guess.... RG was right though, any event will never fail to be triggered.
 
Can't go on that website at work sorry! Not a solution but have you tried creating a new form and putting the code in there? I'm not aware of a setting that turns off all the events in a form but you never know....

Just as a test, try putting [Msgbox "Hi"] without the square brackets in the on open of the form that's causing trouble. Does it pop up and say hi?
 
Can't go on that website at work sorry! Not a solution but have you tried creating a new form and putting the code in there? I'm not aware of a setting that turns off all the events in a form but you never know....

Just as a test, try putting [Msgbox "Hi"] without the square brackets in the on open of the form that's causing trouble. Does it pop up and say hi?

i have attached the db. I have tried but it doesn't work. I have putted a breakpoint in the event procedure, but the code it is never stopped in it
 

Attachments

I just looked at your DB and your code behind (VBA).It looks like your DoCmd.Maximize is a Sub Click() event on one of your text boxes.

Try adding this if you have not already.

Also try setting you Pop Up to "yes".

Code:
Private Sub Form_Load()

DoCmd.Maximize

End Sub
 
Last edited:
That'll be why it's not kicking off in on open or on load then!

Just to re-ask the cleverer posters - will it still maximise in the on load event, or does it need to be in the on open event?
 
I just looked at your DB and your code behind (VBA).It looks like your DoCmd.Maximize is a Sub Click() event on one of your text boxes.

Try adding this if you have not already.

Also try setting you Pop Up to "yes".

Code:
Private Sub Form_Load()

DoCmd.Maximize

End Sub

Sorry maybe i haven't understood what you have writtem, but i have just putted the command DoCmd.Maximize on form_open and form_load procedure. I have putted also as click event in a textbox only for testing it.

what do you mean with "setting you Pop Up to "yes""?
 
Sorry maybe i haven't understood what you have writtem, but i have just putted the command DoCmd.Maximize on form_open and form_load procedure. I have putted also as click event in a textbox only for testing it.

what do you mean with "setting you Pop Up to "yes""?

In design view.. you should be able to bring up your Propety Sheet (F4) and go to the "other" tab. The first property at the top has a field call "Pop Up" and you can choose 'yes' or 'no'.
 
I just looked at your DB and your code behind (VBA).It looks like your DoCmd.Maximize is a Sub Click() event on one of your text boxes.

Try adding this if you have not already.

Also try setting you Pop Up to "yes".

Code:
Private Sub Form_Load()

DoCmd.Maximize

End Sub

in your pc do event procedures occur?
 
Yes.. I tested it on my pc and I was able to get the form to maximize. After i set my "Pop up" to yes.
 

Users who are viewing this thread

Back
Top Bottom