Betreft: RE: Betreft: RE: [AccessD] Looping through forms

Bruce Bruen bbruen at bigpond.com
Tue May 27 08:24:54 CDT 2003


Sorry Marcel, I threw the code in wothout looking for dependancies.  You
can probably get rid of the prop.attRibutes echo as it was for something
I originally wrote the enum for - a.k.a. Damned if I remember!
Bruce


Public Function GetPropType(typeVal As ADODB.DataTypeEnum) As String
'-----------------------------------------------------------------------
----------------
'
'   Description / Purpose :-
'       Converts the numeric property type to a descriptive name
'
'   Parameters:-
'       PARAMETER   TYPE    COMMENTS
'       typeval     integer The property type value to be converted
'
'   Return Value:-
'       A string descriptive of the property type
'
'   Notes:-
'
'------------------------------------------------------------
'   Version     Dated               Author      Comment
'               16-May-03               Bruce   Original.
'============================================================

    Dim strResult As String

    On Error GoTo GetPropType_Error

    Select Case typeVal
        Case adArray: strResult = "AdArray"
        Case adBigInt: strResult = "adBigInt"
        Case adBinary: strResult = "adBinary"
        Case adBoolean: strResult = "adBoolean"
        Case adBSTR: strResult = "adBSTR"
        Case adChapter: strResult = "adChapter"
        Case adChar: strResult = "adChar"
        Case adCurrency: strResult = "adCurrency"
        Case adDate: strResult = "adDate"
        Case adDBDate: strResult = "adDBDate"
        Case adDBTime: strResult = "adDBTime"
        Case adDBTimeStamp: strResult = "adDBTimeStamp"
        Case adDecimal: strResult = "adDecimal"
        Case adDouble: strResult = "adDouble"
        Case adEmpty: strResult = "adEmpty"
        Case adError: strResult = "adError"
        Case adFileTime: strResult = "adFileTime"
        Case adGUID: strResult = "adGUID"
        Case adIDispatch: strResult = "adIDispatch"
        Case adInteger: strResult = "adInteger"
        Case adIUnknown: strResult = "adIUnknown"
        Case adLongVarBinary: strResult = "adLongVarBinary"
        Case adLongVarChar: strResult = "adLongVarChar"
        Case adLongVarWChar: strResult = "adLongVarWChar"
        Case adNumeric: strResult = "adNumeric"
        Case adPropVariant: strResult = "adPropVariant"
        Case adSingle: strResult = "adSingle"
        Case adSmallInt: strResult = "adSmallInt"
        Case adTinyInt: strResult = "adTinyInt"
        Case adUnsignedBigInt: strResult = "adUnsignedBigInt"
        Case adUnsignedInt: strResult = "adUnsignedInt"
        Case adUnsignedSmallInt: strResult = "adUnsignedSmallInt"
        Case adUnsignedTinyInt: strResult = "adUnsignedTinyInt"
        Case adUserDefined: strResult = "adUserDefined"
        Case adVarBinary: strResult = "adVarBinary"
        Case adVarChar: strResult = "adVarChar"
        Case adVariant: strResult = "adVariant"
        Case adVarNumeric: strResult = "adVarNumeric"
        Case adVarWChar: strResult = "adVarWChar"
        Case adWChar: strResult = "adWChar"
    End Select

    GetPropType = strResult

    On Error GoTo 0
    Exit Function

GetPropType_Error:

    MsgBox "Error " & Err.Number & " (" & Err.Description & ") in
procedure GetPropType of Module splForms"

End Function

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
marcel.vreuls at achmea.nl
Sent: Tuesday, May 27, 2003 10:56 PM
To: accessd at databaseadvisors.com
Subject: Betreft: RE: Betreft: RE: [AccessD] Looping through forms


Hi Bruce,

I have some troubles with the prop.attributes. My access does not
understand this. What reference do I need??. I use W2K and A2K. And what
does the GetPropType section do? this is missing also.


Thanks,

Marcel




"Bruce Bruen" <bbruen at bigpond.com>@databaseadvisors.com op 27-05-2003
14:18:19

Antwoord aub aan accessd at databaseadvisors.com

Verzonden door:     accessd-bounces at databaseadvisors.com


Aan:  <accessd at databaseadvisors.com>
cc:

Onderwerp:     RE: Betreft: RE: [AccessD] Looping through forms


Marcel,

This may get you started....

Bruce

Public Sub enumFormProperties(oForm As Form)
'-----------------------------------------------------------------------
--
'
'   Description / Purpose :-
'       Lists all the form, section and control properties for the
'       supplied form in the debug window
'
'   Parameters:-
'       PARAMETER   TYPE                    COMMENTS
'       oForm       MSAccess Form Object
'
'   Return Value:-
'       None
'
'   Notes:-
'       The number of properties displayed is large.  When running this
'       sub you need to set breakpoints so that you can get the
information
'       you want.
'
'------------------------------------------------------------
'   Version     Dated               Author      Comment
'    1.0        16-May-03           Bruce       Original.
'============================================================

    Dim Prop As Property
    Dim formSection As Integer
    Dim formControl As Control

    On Error Resume Next

    Debug.Print "Processing Form Properties"
    For Each Prop In oForm.Properties
        Debug.Print "    "; Prop.Name;
        Debug.Print "=" & Prop.Value;
        Debug.Print " (" & GetPropType(Prop.Type) & ")";
        Debug.Print , Prop.Attributes;
        Debug.Print
    Next Prop
    Stop

    Debug.Print "Processing Form Sections"
    For formSection = 0 To 6
        Debug.Print "    Section " & formSection
        For Each Prop In oForm.Section(formSection).Properties
            Debug.Print "        "; Prop.Name;
            Debug.Print "=" & Prop.Value;
            Debug.Print " (" & GetPropType(Prop.Type) & ")";
            Debug.Print , Prop.Attributes;
            Debug.Print
        Next Prop
    Next formSection
    Stop

    Debug.Print "Processing Form Controls"
    For Each formControl In oForm
        Debug.Print "---- Control ----"
        For Each Prop In formControl.Properties
            Debug.Print Prop.Name;
            Debug.Print "=" & Prop.Value;
            Debug.Print " (" & GetPropType(Prop.Type) & ")";
            Debug.Print , Prop.Attributes;
            Debug.Print
        Next Prop
        Stop
    Next formControl
    Stop
End Sub

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
marcel.vreuls at achmea.nl
Sent: Tuesday, May 27, 2003 10:00 PM
To: accessd at databaseadvisors.com
Subject: Betreft: RE: [AccessD] Looping through forms


Hi Mark,

You are right then I have the documentation available. But than I have
to manualy compare the two documents on paper. That is something I do
not want because it takes up to much time and I can make mistakes.

Thanks,

marcel






"Mitsules, Mark" <mitsules_ms at nns.com>@databaseadvisors.com op
27-05-2003 13:46:48

Antwoord aub aan accessd at databaseadvisors.com

Verzonden door:     accessd-bounces at databaseadvisors.com


Aan:  "'accessd at databaseadvisors.com'" <accessd at databaseadvisors.com>
cc:

Onderwerp:     RE: [AccessD] Looping through forms


For your purposes, will Tools/Analyze/Documenter work?

Mark



-----Original Message-----
From: marcel.vreuls at achmea.nl [mailto:marcel.vreuls at achmea.nl]
Sent: Tuesday, May 27, 2003 5:43 AM
To: accessd at databaseadvisors.com
Subject: [AccessD] Looping through forms


Dear group,

Does anyone know how I can achieve the following.

I want to loop through all the forms and reports available in the
database. Then for each form loop through all the controls and save of
each control the controltype, caption, text, defaultvalue, format,
fieldtype in a table. I want to do this because I have weird things with
controls that suddenly behave strange. That way I can check the current
controls properties with their previous properties.


THanks,

In advance.

Marcel Vreuls






********************* DISCLAIMER *********************
De informatie in dit e-mail bericht is uitsluitend
bestemd voor de geadresseerde. Verstrekking aan
en gebruik door anderen is niet toegestaan.
Door de electronische verzending van het bericht
kunnen er geen rechten worden ontleend aan de
informatie.
************************************************************

_______________________________________________
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


*****************************************************************
Dit bericht is bij binnenkomst gecontroleerd op de
aanwezigheid van virussen. Er zijn geen (bekende)
virussen gevonden.  Active
*****************************************************************






********************* DISCLAIMER *********************
De informatie in dit e-mail bericht is uitsluitend
bestemd voor de geadresseerde. Verstrekking aan
en gebruik door anderen is niet toegestaan.
Door de electronische verzending van het bericht
kunnen er geen rechten worden ontleend aan de
informatie.
************************************************************

_______________________________________________
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


*****************************************************************
Dit bericht is bij binnenkomst gecontroleerd op de
aanwezigheid van virussen. Er zijn geen (bekende)
virussen gevonden.  Active
*****************************************************************






********************* DISCLAIMER *********************
De informatie in dit e-mail bericht is uitsluitend
bestemd voor de geadresseerde. Verstrekking aan
en gebruik door anderen is niet toegestaan.
Door de electronische verzending van het bericht
kunnen er geen rechten worden ontleend aan de
informatie.
************************************************************

_______________________________________________
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