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

Twist on 'Tabbing to the next record' bug

P: n/a
Hi there,

I have been frustrated by the 'next record' problem when a user tabs
off the last control on a form.

I have tried a couple of the suggestions listed on the newsgroup, but
so far nothing has solved the problem in relation to my database.

I have 3 subforms on the form and serveral other controls (such as
buttons). When the final subform receives focus (a one-to-many style
relationship with the master form) I want the focus to set to the
first field on my master form.

However I've tried this so far (setfocus, invisible controls etc) the
record still either jumps to the next record, or a black new one.

Any ideas would be greatfully received.
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
>I have been frustrated by the 'next record' problem when a user tabs
off the last control on a form.

I have tried a couple of the suggestions listed on the newsgroup, but
so far nothing has solved the problem in relation to my database.

I have 3 subforms on the form and serveral other controls (such as
buttons). When the final subform receives focus (a one-to-many style
relationship with the master form) I want the focus to set to the
first field on my master form.

However I've tried this so far (setfocus, invisible controls etc) the
record still either jumps to the next record, or a black new one.


Perhaps you've done this already, but be sure you have the "cycle" property of
the main form set to "current record."

HTH.

Jan

Jan Stempel
Stempel Consulting
Nov 12 '05 #2

P: n/a
> Perhaps you've done this already, but be sure you have the "cycle" property of
the main form set to "current record."

HTH.

Jan

Jan Stempel
Stempel Consulting


I'm afraid I've already tried that. Both form and subform Cycle
properties are set to 'Current Record'. Any other ideas?
Nov 12 '05 #3

P: n/a

A fairly dirty method would be:

in the first control of the subform place code in the OnExit event that
checks if the control is null or not. If it is null then set the focus
to the control on the main form you want to use.

I refer to the main form control by:

me.parent.setfocus

and then

docmd.gotocontrol "controlname"

I can't get the .setfocus to work for a named control when referring to
the parent - probably just my weak coding ability.
--
Posted via http://dbforums.com
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.