If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
What would cause this behavior?
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! -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200701/1 |
#2
|
|||
|
|||
What would cause this behavior?
I would look to see if there is a Requery method used in the code. It will
cause this to happen. -- Dave Hargis, Microsoft Access MVP "Slez via AccessMonster.com" wrote: 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! -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200701/1 |
#3
|
|||
|
|||
What would cause this behavior?
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! Klatuu wrote: 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! -- Message posted via http://www.accessmonster.com |
Thread Tools | |
Display Modes | |
|
|