[access 2007] event doesn't happen (1 Viewer)

serbring

Registered User.
Local time
Yesterday, 22:36
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
 

RuralGuy

AWF VIP
Local time
Yesterday, 23:36
Joined
Jul 2, 2005
Messages
13,825
The chance of a form loading without the OnLoad event firing is just simply non-existant. Something else is going on.
 

RuralGuy

AWF VIP
Local time
Yesterday, 23:36
Joined
Jul 2, 2005
Messages
13,825
Everything is now in a trusted location, correct?
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 06:36
Joined
Sep 12, 2006
Messages
15,738
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?
 

JamesMcS

Keyboard-Chair Interface
Local time
Today, 06:36
Joined
Sep 7, 2009
Messages
1,819
Wouldn't it have to be in the on open anyway?
 

JamesMcS

Keyboard-Chair Interface
Local time
Today, 06:36
Joined
Sep 7, 2009
Messages
1,819
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.
 

JamesMcS

Keyboard-Chair Interface
Local time
Today, 06:36
Joined
Sep 7, 2009
Messages
1,819
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?
 

serbring

Registered User.
Local time
Yesterday, 22:36
Joined
Dec 7, 2008
Messages
17
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

  • database implement 2k3.zip
    108.2 KB · Views: 122

Subcancel

Registered User.
Local time
Today, 01:36
Joined
Apr 21, 2010
Messages
29
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:

JamesMcS

Keyboard-Chair Interface
Local time
Today, 06:36
Joined
Sep 7, 2009
Messages
1,819
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?
 

serbring

Registered User.
Local time
Yesterday, 22:36
Joined
Dec 7, 2008
Messages
17
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""?
 

Subcancel

Registered User.
Local time
Today, 01:36
Joined
Apr 21, 2010
Messages
29
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'.
 

serbring

Registered User.
Local time
Yesterday, 22:36
Joined
Dec 7, 2008
Messages
17
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?
 

Subcancel

Registered User.
Local time
Today, 01:36
Joined
Apr 21, 2010
Messages
29
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

Top Bottom