Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to know if your in a subform??? 1

Status
Not open for further replies.

din2005

Programmer
Mar 22, 2005
162
GB
Hey all i have this subform with a check boxbut also u can maximise this subform to see all the form.

Now about the checkbox i want it to do the same functionality in the after update if it was maximised or if it was in a subform... can this be possible?

i.e

check if u r in subform and do the appropriate action or

if form is maximised then do the appropriate action.

many thanks

 
I do not understand your point, code on a subform should work the same no matter whether it is maximised or not. [ponder]
 
Code:
Public Function isSubForm(frm As Access.Form) As Boolean
  On Error GoTo errLabel
  isSubForm = (frm.Parent.Name = frm.Parent.Name)
  Exit Function
errLabel:
  If Err.Number = 2452 Then
    Err.Clear
   Else
    MsgBox Err.Number & "  " & Err.Description
  End If
End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top