tab control

B

benj

I have a main form and several subforms (tab control named NEC, HISTO and BLD
CHEM). The subform BLD CHEM also have a subform (tab control named RBC and
SE). I created a print preview icon on the main form. I entered the code:
Select Case Me.TabCtl23.Pages(Me.TabCtl23).Name
Case "NEC"
stDocName = "RF_necropsy"

Case "HISTO"
stDocName = "RF_histo1"
Case "BLD CHEM"
Select Case Me.TabCtl5.Pages(me.TabCtl5).Name
Case "RBC"
stDocName = "RF_routinebldchem"
Case "SE"
stDocName = "RF_specialbldchem"
End Select
End Select

but when i preview BLD CHEM, a message "microsoft can't find the field
'TabCt15'referred to in your expression". How can i fix this problem?

thanks!
 
B

Brendan Reynolds

Is it possible that you might have typed the number 1 (one) in place of the
letter l?

Giving more meaningful names to those tab controls , e.g tabOuter and
tabInner (or OuterTab and InnerTab if you prefer) would avoid this kind of
problem.
 
B

benj

Thanks for the reply! I used the letter l instead of the number 1 in
TabCtrl5, i did it by copying the name in the property box. I finally got it
working by expounding the "Me" to Forms!FM_bldchem!TabCtrl5
 
Top