Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2007

Tip: Looking for answers? Try searching our database.

Setting subform properties

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mscertified - 11 May 2007 19:26 GMT
I have 2 forms; one for editing data and another for viewing the same data.
Both forms contain the same subform. I'd like to dynamically set the
ALLOWEDITS etc. properties on the subform based on each main form. How would
I do this?

Thanks.
Damon Heron - 11 May 2007 20:08 GMT
In the main forms' load events, put
Me!yoursubformname.Form.AllowEdits = False 'or true if it is the form for
editing

HTH
Damon

>I have 2 forms; one for editing data and another for viewing the same data.
> Both forms contain the same subform. I'd like to dynamically set the
[quoted text clipped - 3 lines]
>
> Thanks.
Marshall Barton - 11 May 2007 20:41 GMT
>I have 2 forms; one for editing data and another for viewing the same data.
>Both forms contain the same subform. I'd like to dynamically set the
>ALLOWEDITS etc. properties on the subform based on each main form. How would
>I do this?

You will probably be better off placing the code in the
subforms:

    Me.AllowEdits = (Parent.Name = "edit form's name")

Signature

Marsh
MVP [MS Access]

Damon Heron - 11 May 2007 20:51 GMT
that's why yer an MVP.  Very elegant solution, Marsh.

Damon

>>I have 2 forms; one for editing data and another for viewing the same
>>data.
[quoted text clipped - 7 lines]
>
> Me.AllowEdits = (Parent.Name = "edit form's name")
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.