TabForm problemo

thewiseguy

Registered User.
Local time
Today, 23:55
Joined
Apr 14, 2004
Messages
56
I've got a button at the bottom of my form that checks that certain fields are filled in correctly, and if they are, opens up a new record. However, upon a new record opening, the tabform part always sets itself to page 6 instead of 0 (i.e. first page).

What the...?

Cheers :D
 
When you go from record-to-record, the form will stay on whichever tab was last chosen. That is, unless you set up some code in the form's Current event to move back to the desired starting tab.
 
it doesn't seem to matter which page i was in last (0 to 9) it will always open up a new record with page 6 showing?!?
i thought about using some sorta code using GoToPage but I'm not sure how.
also, i thought about setting the focus to the first page and then setting focus to where i ultimately want the focus to be - the top control on the main form.
 
If you're always going to page 6 no matter what page you were on previously, maybe there's some code running that sets the focus to a control on page 6.

To set the focus to a particular page on a tab control:
Me.TabControlName.Pages("PageName").SetFocus
 
fubar

there ain't any exrtraneous code anywhere - it's just weird.
anyway i used yr advice and put a SetFocus to that subform first and then next line setfocus to the field in the main form i intended. bit messy but it works ok.

cheers for the help.
 

Users who are viewing this thread

Back
Top Bottom