[AccessD] Open all forms

Rocky Smolin at Beach Access Software rockysmolin at bchacc.com
Mon Jul 21 23:11:00 CDT 2008


Yeah.  That's pretty much was I was shown.  I was going to post the module
but yours is really it.  I did set several properties of the controls.  The
help is actually real good in showing what the values are for things like
Special Effect: 

    For Each ctl In Forms(Doc.Name)
        Select Case ctl.ControlType
        
            Case 109 'text box
                ctl.FontName = "Tahoma"
                ctl.ForeColor = 8388608
                ctl.FontWeight = 400 'normal
            Case 100 'label
                ctl.FontName = "Tahoma"
                ctl.ForeColor = 8388608
                ctl.FontWeight = 400 'normal
            Case 104 ' command button
                ctl.FontName = "Tahoma"
                ctl.ForeColor = 8388608
                ctl.FontWeight = 400 'normal
            Case 101 ' box
                ctl.BackColor = 16765875
                ctl.BorderColor = 8388608
            Case 102 ' line
                ctl.BorderColor = 8388608
            Case 107 'option frame
                ctl.BorderStyle = 1
                ctl.BorderColor = 8388608
                ctl.SpecialEffect = 0
            Case 111 ' combo box
                ctl.FontName = "Tahoma"
                ctl.ForeColor = 8388608
                ctl.FontWeight = 400 'normal
            
        End Select
        
    Next ctl 

Rocky Smolin
Beach Access Software
858-259-4334
www.e-z-mrp.com
www.bchacc.com
 
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark A Matte
Sent: Monday, July 21, 2008 7:07 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Open all forms


Rocky,

I think you already solved your issue...but in case not:

This was for reports...but I'm sure you can modify for forms.

Hope it helps...

Mark A. Matte

P.S...of course credit goes to ACCESSD!!!!!!!!

***************START*********************
    Dim obj As AccessObject, dbs As Object
    Dim rpt As Report
    Dim ctl As Control
    Set dbs = Application.CurrentProject
    ' Search for open AccessObject objects in AllReports collection.
    For Each obj In dbs.AllReports

  DoCmd.OpenReport obj.Name, acViewDesign
            Set rpt = Reports(obj.Name)
            str1 = "CurrentUser"
            str2 = "GetUser"
On Error Resume Next
    For Each ctl In rpt.Controls
        If ctl.ControlType = acTextBox Then
             If InStr(1, ctl.ControlSource, str1) Then
                  ctl.ControlSource = Replace(ctl.ControlSource, str1, str2)
            End If         
         End If 
    Next

  DoCmd.Close acReport, obj.Name, acSaveYes

  Set rpt = Nothing
  Set ctl = Nothing
        
        
        
        
    Next obj
***************END*********************


> From: rockysmolin at bchacc.com
> To: accessd at databaseadvisors.com
> Date: Mon, 21 Jul 2008 08:25:57 -0700
> Subject: Re: [AccessD] Open all forms
>
> Thanks Mark. That's what I need - loop through all the forms, then 
> also loop through all the controls - I can change the Times font to 
> Arial or Tahoma and change the forecolor as well.
>
>
> Rocky Smolin
> Beach Access Software
> 858-259-4334
> www.e-z-mrp.com
> www.bchacc.com
>
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark A 
> Matte
> Sent: Monday, July 21, 2008 8:16 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Open all forms
>
>
> Rocky,
>
> I did something similar a few months ago. I searched every form for a 
> text box that had a ControlSource LIKE "*MySearch*" and Updated the 
> ControlSource to "SomethingNew".
>
> I think this is what you need. I Have it at home and can send it this 
> evening (about 3:00 your time)
>
> Thanks,
>
> Mark A. Matte
>
>
>
>
>> From: rockysmolin at bchacc.com
>> To: accessd at databaseadvisors.com
>> Date: Mon, 21 Jul 2008 07:11:26 -0700
>> Subject: [AccessD] Open all forms
>>
>> Dear List:
>>
>> I am trying to write a quick module that will open all the forms in 
>> turn in design view, change one property (in this case the background 
>> color of the detail section), save and close. But I can't seem to get 
>> the syntax right to open each of the forms in turn.
>>
>> Does anyone have a snip to do this?
>>
>> MTIA
>>
>> Rocky Smolin
>>
>> Beach Access Software
>>
>> 858-259-4334
>>
>> www.e-z-mrp.com
>>
>> www.bchacc.com
>>
>>
>>
>>
>>
>>
>> --
>> AccessD mailing list
>> AccessD at databaseadvisors.com
>> http://databaseadvisors.com/mailman/listinfo/accessd
>> Website: http://www.databaseadvisors.com
>
> _________________________________________________________________
> With Windows Live for mobile, your contacts travel with you.
> http://www.windowslive.com/mobile/overview.html?ocid=TXT_TAGLM_WL_mobi
> le_072
> 008
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com

_________________________________________________________________
With Windows Live for mobile, your contacts travel with you.
http://www.windowslive.com/mobile/overview.html?ocid=TXT_TAGLM_WL_mobile_072
008
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list