(no subject)

J

Jeff

Hi All,

I have a form with a TabControl that has 4 Tabs.

On each tab is a different subform.

The form 'fmStudentGrades'is opened automatically by another form if 3
specific fields have not been filled - lets call them txtbox1, txtbox2
and txtbox3. (After a certain date they need to be filled.)

I'd like the code that opens the form to change the backgrouncolor of
these boxes and set the focus to the field 'txtbox1' They are all on the
3rd Tab called 'Results' in a subform called 'sbfEnglish'

I just can't seem to get to target the boxes at all. I can target the
Tab 'Results' with:

Forms![Add Aluno 2]!Results.SetFocus

But I can't get to target the txtboxes in the Tab 'Rsults'

Any ideas greatly appreciated,

jeff
 
K

Ken Snell [MVP]

Just set focus to the desired textbox -- ignore the tab page on which it's
located. Controls on a tab control are also members of the form's Controls
collection, so you can reference them directly: (following example code step
assumes that the form is named Add Aluno 2)

Forms![Add Aluno 2]!txtbox1.SetFocus
 

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