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 24 2012, 03:21 AM
Post #2

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



Aqua - glad you got it sorted, and Doug, thanks for following through on my post (IMG:style_emoticons/default/thumbup.gif) (I'd taken an early night here!)

Looking through the code it may have been more robust to reference the instantiated form with it's own form variable,
i.e.
CODE

Public Function UpdateAllFormsProp()
On Error GoTo err_proc

Dim srcFrm As Object
Dim strFrm As String
Dim frmOpen As Form

For Each srcFrm In Application.CurrentProject.AllForms
strFrm = srcFrm.Name
Debug.Print strFrm
DoCmd.OpenForm strFrm, acDesign
Set frmOpen = Forms(strFrm)
With frmOpen
.AllowFormView = True
.AllowDatasheetView = False
.AllowPivotTableView = False
.AllowPivotChartView = False
.AllowLayoutView = False
End With
DoCmd.Close acForm, strFrm, acSaveYes
Next srcFrm

exit_proc:
Set frmOpen = Nothing
Set srcForm = Nothing
Exit Function

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

End Function
'
'


but as this is a bit of code that I only use occasionally and it works, I've never 'fixed' it!

Cheers
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: 22nd May 2013 - 03:09 PM