Figuring out which tab called the subform

S

samaclau

I would like to have two different tabs that call the same form. However,
depending upon which tab called it, I want to use a different query and
default value in a certain field. How do I figure out which tab called the
subform?
 
A

Allen Browne

Look at the Value of the tab control to see which page is active.

Example:
Select Case Me.[MyTab].Value
Case Me.[MyPage].PageIndex
MsgBox "Called by MyPage"
Cae Me.[SomeOtherPage].PageIndex
MsgBox "Called by SomeOtherPage"
End Select
 
Top