Clicking Buttons Twice to make them work

Galaxiom

Super Moderator
Staff member
Local time
Tomorrow, 08:14
Joined
Jan 20, 2009
Messages
12,832
I am finding on some of my forms that the first button to be clicked after opening must be clicked twice before it will run its event. After the first time all is as normal.

They used to work normally. I don't know what I changed in between.

What would cause this?
 
galax,

the cause may be a bit of corruption. i have this problem right now on a form that i open. there is a "click to play" button on the form, but when the form opens, it runs about 200 lines of code. i have .wav files playing behind the button, so i don't know if that is part of the problem, but i know that i've waited for a long time before pushing the button. it just doesnt work right away. it may have something to do with the code initializing or something, but i'm not for sure.
 
My form doesn't do anything busy in the background and it can be sitting open for several minutes before pressing the button. Any button.

In fact I've now discovered it isn't just buttons. I cannot move the focus to a subform control unless I click on something else first.

Nothing on the form will work properly until a second click. If the first click is made on a subform or a combobox I get a can't move focus error.

This tied into a problem I posted last week.
http://www.access-programmers.co.uk/forums/showthread.php?t=175122

It also appears the OnLoad event is not firing.
The subform has an OnLoad event and this is firing.

Perhaps some sort of clash between the form and its subform is the source of the problem.

However I am reasonably confident that the form had previously worked with this arrangement.
Moreover I have another form with a very similar arrangement and it works fine.

I have raised another question concerning the chain of events when both a subform and form have OnLoad events..

http://www.access-programmers.co.uk/forums/showthread.php?p=862084#post862084
 
Last edited:

Users who are viewing this thread

Back
Top Bottom