Unexpected form / subform behavior

  • Thread starter Zippy the Pinhead
  • Start date
Z

Zippy the Pinhead

Hello

I am seeing some weird behavior on a form of mine.

The main form has a tab control. On one of the tab controls is a
subform consisting of a combo box based upon a query which in turn is
based upon a details table. Linked fields from the detail table and
the main table (on which the main form is based). The details table
comprises two foreign keys (the primary keys of two tables) and the
two foreign keys comprise the primary key of the details table.

It should work fine, but here's what happens: I fill the main form in
just fine until I get to the tab control containing the subform which
contains the combo box. If I place the focus into the combo box, the
main form advances to the next (blank) record. To get back to where I
was, I hit the back arrow < on the record selector at the bottom of
the main form. This takes me back to the record BEFORE the one for
which I was filling the form. I then hit the forward arrow > on the
record selector and it takes me to the place I need to be.

I have absolutely NO clue why this is happening. Any ideas?

Thanks.
 
B

Bas Cost Budde

First thought: check the taborder of your controls. Maybe the combobox
is the first in row, but somehow gets passed, so when you think you
finally enter it, Access thinks you're tabbing to a new record.

Upon review I doubt this is what is going on, but do check since (grin)
my first thoughts quite often turn out worth trying. (That is, after
I've rejected them, tried 45 other things... :) )
It should work fine, but here's what happens: I fill the main form in
just fine until I get to the tab control containing the subform which
contains the combo box. If I place the focus into the combo box, the
main form advances to the next (blank) record.

Maybe there is something not working in
linkChildFields/linkMasterFields; maybe you have event handlers that
cause noise.
 
D

Dirk Goldgar

Zippy the Pinhead said:
Hello

I am seeing some weird behavior on a form of mine.

The main form has a tab control. On one of the tab controls is a
subform consisting of a combo box based upon a query which in turn is
based upon a details table. Linked fields from the detail table and
the main table (on which the main form is based). The details table
comprises two foreign keys (the primary keys of two tables) and the
two foreign keys comprise the primary key of the details table.

It should work fine, but here's what happens: I fill the main form in
just fine until I get to the tab control containing the subform which
contains the combo box. If I place the focus into the combo box, the
main form advances to the next (blank) record. To get back to where I
was, I hit the back arrow < on the record selector at the bottom of
the main form. This takes me back to the record BEFORE the one for
which I was filling the form. I then hit the forward arrow > on the
record selector and it takes me to the place I need to be.

I have absolutely NO clue why this is happening. Any ideas?

Thanks.

Sounds weird indeed. Is there any code behind the combo box or the
subform? If so, what is it?
 
Z

Zippy the Pinhead

Sounds weird indeed. Is there any code behind the combo box or the
subform? If so, what is it?

I can't find any, and I certainly didn't insert any.

It did look as though the behavior has changed since I changed the
"cycle" property to "same record", though I haven't tested it in all
possible situations of adding data; this will have to wait until I get
some new records to enter.
 
D

Dirk Goldgar

Zippy the Pinhead said:
I can't find any, and I certainly didn't insert any.

It did look as though the behavior has changed since I changed the
"cycle" property to "same record", though I haven't tested it in all
possible situations of adding data; this will have to wait until I get
some new records to enter.

That's puzzling, but it suggests that it has something to do with the
tab order of controls on the form, combined with the "Next Record" Cycle
property.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top