Click button....hard?

JCross

Registered User.
Local time
Today, 11:33
Joined
Feb 28, 2002
Messages
116
Hi! I have a button on a form that runs through some queries before closing the form. Weird thing is, you have to click the button..hard? to make the queries run? SOmetimes if you click quickly it just closes the form, and then if you go back and click hard it runs the queries and then closes the form. Any ideas?

Thank you!

Jennifer:confused:
 
Amusing ... clicking the button hard. That is a new one for me, but I'll take a stab at it.:rolleyes: In design view, right mouse click on the button and select Build Event ... and paste in the code here.

Also, in the properties dialog box for this command button, which Events have code for them?

Hey, just noticed ... All Hail Oregon! And a new Mom, huh. Cool, my wife is pregos with our first ...:eek:
 
Last edited:
When I click Build Event for the button, it just takes me to the code I've already written. i only have an On Click event..........
I know it sounds ridiculous, and it is a good chunk of code, but nothing complicated. It validates the form, then runs some queries and closes the form - updating a parent form. Argh!

Thanks for responding.

Jennifer
 
Well, the code is what I'm wondering about ... Are you doing any branching if certain things are present or missing on the form? Are you using any breakpoints where the queries are run and also where the forms are closed and then replicating the soft click to see where control is being taken? Do you have any other objects open that could possibly be intercepting the focus and closing the form ... lots of possibilities. I have just never heard of Access differentiating between quick clicks and regular. I've seen the button take the focus but not running it's OnClick event on a soft click, but if there are no other events associated with the button ...
 
I really have no other way to describe it - if i click. ..too fast? not hard enough? that's when it closes the form without running any of my queries. I'll do a really close check on my code to see what's going on, but when I tried to step through before, of course it performs everything just fine. I'm having a hard time trapping the problem.

J
 
Well, put a breakpoint where the query is supposed to run and try the soft click. If your form still closes without hitting the breakpoint, remove that breakpoint and put a breakpoint where the code closes the form. If the soft click closes the form without stopping at the breakpoint, then other code is being run and you are going to have to set breakpoints all over he||'s ha|f acre to find where the code is closing the form.
 
Perhaps you could fix it by placing a label beneath the button:

"Click Hard"

That's how we fix things in the movie business.
 
HAH! That sounds a hell of a lot more tempting than chsing code around...............I think i'll do it!


Jennifer
 
Just wanted to make this the first ever 3-Oregonian post!!

:D
 
Indeed! Too bad about our sports teams here in the great NW ... Tough Bowl season.
 

Users who are viewing this thread

Back
Top Bottom