Tab control with subform containing embedded subform

  • Thread starter Thread starter LuvTruth
  • Start date Start date
L

LuvTruth

I'm using Access 97. I have a tab control that contains a number of subforms.
At least one of these subforms also contains an embedded subform. I'm trying to
go to a new record on the lowest level subform when I exit a combo box on a
subform. I've tried all kinds of things using recordsetclone, bookmarks, etc. I
have the system working on a form that is not contained in the tab control, but
I'd like to be able to get it working from within the tab control. So far I'm
not having any success. How can I accomplish this?

Gareth Tonnessen
(e-mail address removed)
 
I'm using Access 97. I have a tab control that contains a number of subforms.
At least one of these subforms also contains an embedded subform. I'm trying to
go to a new record on the lowest level subform when I exit a combo box on a
subform. I've tried all kinds of things using recordsetclone, bookmarks, etc. I
have the system working on a form that is not contained in the tab control, but
I'd like to be able to get it working from within the tab control. So far I'm
not having any success. How can I accomplish this?

The Tab Control has no impact on how you reference of control or a
subform. The tab control is just a way to reuse screen real estate.
That said, moving around on subforms is NOT obvious!

If you want to move to the last record on the form in the subform
control named subInner, which is on a form in the subform control
named subOuter from the mainform you can use

Me!subOuter.SetFocus
Me!subOuter.Form!subInner.SetFocus
Me!subOuter.Form!subInner.Form!txtSomeControl.SetFocus
DoCmd.GoToRecord acNewRecord

Either subform, or both, or neither can be on a Tab control, it
shouldn't make any difference.
 
Thank you, thank you John! I had to tweak it a little bit (such as two commas
before the acNewRec), but I got it working. I greatly appreciate the help!
 
Back
Top