Strange pointer flicker on Form_Open (1 Viewer)

JamesMcS

Keyboard-Chair Interface
Local time
Today, 22:32
Joined
Sep 7, 2009
Messages
1,819
Afternoon all, hope you're well!

I've got an odd one here. I have a form that has a variety of subforms, within which lie some calculated controls for totalling up sales etc. When I open this form, it seems to get stuck in some sort of calculation loop, with the contents of all the subforms flickering very quickly.

So I went to do a bit of debugging, and put a break on the form's on open event. The code stopped there fine but the pointer rapidly flickers between an hourglass and the pointer I'd expect to see, in this case the select text one.

Has anybody encountered this before? I'm using A2003. Worth noting that I wrote it in A2007 and it works fine there....
 

vbaInet

AWF VIP
Local time
Today, 22:32
Joined
Jan 22, 2010
Messages
26,374
Comment out your hourglass and remove the calculated controls. You should see some improvement.
 

JamesMcS

Keyboard-Chair Interface
Local time
Today, 22:32
Joined
Sep 7, 2009
Messages
1,819
They have to be there sadly - they show total depending upon what's selected in the subforms.

Just wondered why I'd get that flickering on the first line of the on open event - not code, but the actual "Form_Open()" line.... That's the first event that kicks off when opening in form view right?

I thought it must be corruption - there's a similar form in the project that has the same kind of controls and works fine.
 

vbaInet

AWF VIP
Local time
Today, 22:32
Joined
Jan 22, 2010
Messages
26,374
They have to be there sadly - they show total depending upon what's selected in the subforms.
That's fine, but just take them out for now to see if that's the root cause. If it is then we can work on a workaround.
 

JamesMcS

Keyboard-Chair Interface
Local time
Today, 22:32
Joined
Sep 7, 2009
Messages
1,819
I've gone a bit further and am dismantling the form bit by bit - it seems there's a problem in the code somewhere so will add bits in and see where it start going bonkers. If I find out I'll post back!

Cheers VBA - been a while!

J
 

JamesMcS

Keyboard-Chair Interface
Local time
Today, 22:32
Joined
Sep 7, 2009
Messages
1,819
Aye, had a month off thanks to a lovely white van man knackering girlfriends brand new car with me in it. Sure missed this place....
 

vbaInet

AWF VIP
Local time
Today, 22:32
Joined
Jan 22, 2010
Messages
26,374
He was just performing a crash test. Since you came out alive you're now 100% sure that this car is safe ;)

I hope no cracked bones?
 

JamesMcS

Keyboard-Chair Interface
Local time
Today, 22:32
Joined
Sep 7, 2009
Messages
1,819
ha ha so you're saying I should be thanking him? I'll send him a card today :)

Nope nothing broken, just walking around like I've crapped my pants (whiplash) - much to my coleagues' amusement
 

JamesMcS

Keyboard-Chair Interface
Local time
Today, 22:32
Joined
Sep 7, 2009
Messages
1,819
Well, the physio did recommend a few minutes' walk every day... who am I to ignore medical advice?
 

JamesMcS

Keyboard-Chair Interface
Local time
Today, 22:32
Joined
Sep 7, 2009
Messages
1,819
Right. I cracked it.

It was to do with the subform's link criteria. The master link was set to a text box on the main form, which was in turn controlled by the value selected in another subform.

All I had to do was make these unbound, and put some code in the other subform's on current to populate the text box with the right value, job's a goodun!

That only took me about a month of head scratching to sort out......
 

JamesMcS

Keyboard-Chair Interface
Local time
Today, 22:32
Joined
Sep 7, 2009
Messages
1,819
Wish you were my boss! Actually, I wish Anne Hathaway was my boss.... but don't take it personally
 

JamesMcS

Keyboard-Chair Interface
Local time
Today, 22:32
Joined
Sep 7, 2009
Messages
1,819
Dunno, she seems the type to dish out some harsh discipline... oo er
 

Users who are viewing this thread

Top Bottom