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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modify AllowEdits of a Sub-Subform

Status
Not open for further replies.

nonturbo

IS-IT--Management
Aug 27, 2001
78
US
I have a form (MainForm) that is a tabbed control with many pages. On one of the pages, there is a subform (SubformA) that contains a subform within the subform (SubformA1), I have AllowEdits set to False, and an Edit button that runs the following VBA Code...

' Unlock Forms
Me.AllowEdits = True
Me.SubformA.Form.AllowEdits = True

This will unlock the MainForm and SubformA, yet SubformA1 will still be "locked". Me.SubformA1.Form.AllowEdits = True gives me a compile error Method or Datamember not found, and VB opens with SubformA1 highlighted. I searched on groups.google.com and the web, and found nothing. Then I spent a few hours at the local bookstore, and still nothing. =( If anyone can help, I would REALLY appreaciate it!!!!

Thanks in advance....

 
The problem is with how you are referencing the form, A1 is within A so you need to go through A to get to A1.

Me.[SubformA].Form![SubFormA1].Form.AllowAdditions = True

HTH Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top