UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

> Setting New Form Properties When Designing New Forms, Office 2007    
 
   
Aquadevel
post Feb 23 2012, 02:43 PM
Post #1

UtterAccess VIP
Posts: 6,898
From: Earth...




Hi My 'Utter Friend's,

I'm sure some one has done this.

When creating new forms for an app, its a pain to select like:
Close=no
Min/Max=no
Etc,

When creating new forms, I need a 'quick' way to select a form and change all the settings I need.

Someone must have an idea.... (IMG:style_emoticons/default/iconfused.gif)
Go to the top of the page
 
+
 
Start new topic
Replies
pere_de_chipstic...
post Feb 23 2012, 03:59 PM
Post #2

UtterAccess VIP
Posts: 7,591
From: South coast, England



Hi Aqua

I go with Doug's suggestion, and have used this in the past to do the same:

CODE
Public Function UpdateAllFormsProp()
On Error GoTo err_proc

    Dim srcFrm As Object
    Dim strFrm As String
    
    For Each srcFrm In Application.CurrentProject.AllForms
        strFrm = srcFrm.Name
        DoCmd.OpenForm strFrm, acDesign
        Set srcFrm = Forms(strFrm)
        With srcFrm
            .SomeProperty1 = SomeValue1    
            .SomeProperty2 = SomeValue2
        End With
        DoCmd.Close acForm, strFrm, acSaveYes
    Next srcFrm

exit_proc:
    Exit Function
    
err_proc:
    MsgBox "Error in Function: 'UpdateAllFormProps'" & Chr(13) & Err.Description
    Resume exit_proc

End Function


Obviously changing
.SomeProperty1 = SomeValue1
.SomeProperty2 = SomeValue2
as appropriate

hth

This post has been edited by pere_de_chipstick: Feb 23 2012, 04:01 PM
Go to the top of the page
 
+

Posts in this topic


Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 25th May 2013 - 12:13 PM