What would cause this behavior?

  • Thread starter Slez via AccessMonster.com
  • Start date
S

Slez via AccessMonster.com

I have a form called frmMainScreen with a subform called frmProjectSubformTab,
which contains a subform called frmBid.

frmBid displays record in single form view. On each of those records is a
command button that opens another form called frmBidItems. When opened, that
form references the "ProjectID" that it was selected from in frmBid. It has
2 nested subforms: First is frmQryBidLineItems. frmBidLineItemsSubform is a
subform of that.

Now for the strange behavior. When I enter new records into
frmQryBidLineItems and then close frmBidItems, the record in frmBid is right
where I left it. (I.E. If I was in BidNumber "3", when I close the form,
frmBid is still on BidNumber "3".) But if I add new records in
frmBidLineItemsSubform, when I close frmBidItems, the record in frmBid
reverts back to BidNumber "1" (the first record).

I know that frmBid changes focus to the first record as soon as a new record
is added to frmBidLineItemsSubform. What might cause this behavior? It
didn't do this a few days ago. I may have changes another event or property
that affects this without realizing it. How can I identify what causes this?

Any input is appreciated!
 
G

Guest

I would look to see if there is a Requery method used in the code. It will
cause this to happen.
 
S

Slez via AccessMonster.com

I did have "Me.Parent.Recalc" in the After Update event. I tried it in the
On Close event and got the same result. The reason I had that was due to
some calculated controls in frmBid. I eliminated that code and it works as
intended. Thanks for the clue in!

I now need to refresh that form, which isn't a big deal, but do you know of
any way to recalc and still maintain focus on whatever record was/is
displayed?
Thanks!
I would look to see if there is a Requery method used in the code. It will
cause this to happen.
I have a form called frmMainScreen with a subform called frmProjectSubformTab,
which contains a subform called frmBid.
[quoted text clipped - 18 lines]
Any input is appreciated!
 

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