By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,493 Members | 1,233 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,493 IT Pros & Developers. It's quick & easy.

Form_Current() getting called automatically

100+
P: 553
Hi

I am finding it difficult to use Form_Current() event of a subform.

It gets called automatically. I changed the tab order so that the Sub Form with Form_Current() event came first or in the end in the order; but this doesn't resolve the problem.

Interestingly, if one of the controls on the form gets focus, the Form_Current() gets called.

Any idea how to get rid of this?

Thanks
qi
Oct 5 '07 #1
Share this Question
Share on Google+
5 Replies


NeoPa
Expert Mod 15k+
P: 31,186
I suggest you read the help on these events QI (type in current then hit F1 for context-sensitive help). It seems your understanding of the whole process is off so you're getting confused (in an area which is admittedly quite complex). read up on what is triggered when and you will have a much better understanding of why things happen.
Oct 6 '07 #2

nico5038
Expert 2.5K+
P: 3,072
It would be nice when you would describe the "problem", as the OnCurrent event is always executed (both for the main-form and for the sub-form), thus only usefull for "single record bound" processing.

Nic;o)
Oct 6 '07 #3

100+
P: 553
Ok Thanks... i wasn't expecting Form_Current to behave in this manner. More study of this event has cleared up the confusion now.

qi

It would be nice when you would describe the "problem", as the OnCurrent event is always executed (both for the main-form and for the sub-form), thus only usefull for "single record bound" processing.

Nic;o)
Oct 8 '07 #4

NeoPa
Expert Mod 15k+
P: 31,186
That sounds like a good answer Qi.
Glad you understand things better now (much better than simply getting past an individual problem :))
Oct 8 '07 #5

ADezii
Expert 5K+
P: 8,597
Hi

I am finding it difficult to use Form_Current() event of a subform.

It gets called automatically. I changed the tab order so that the Sub Form with Form_Current() event came first or in the end in the order; but this doesn't resolve the problem.

Interestingly, if one of the controls on the form gets focus, the Form_Current() gets called.

Any idea how to get rid of this?

Thanks
qi
The Current() Event of a Form does not fire when Controls on the Form receive the Focus. This would only happen when the Form is initially opened, and a Control has a Tab Index = 0 (1st Control to receive the Focus). This is the Current() Event of the Form firing, not the GotFocus() Event of the Control.
Oct 8 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.