Hi guys -
I am trying to extract information about my Access 2000 db because I may have to analyze and rewrite most of it.
I'm referencing the properties of the containers and documents within the db and well, I'm a little over my head.
I'm getting a Type mismatch error as I try to loop thru the property values..... see the code below that is blocked-off with asterisks.
Thanks for your help. John
Sub PrintObjectProperties(strObjectType As String, strObjectName _
As String)
Dim dbs As Database, ctr As Container, doc As Document
Dim intI As Integer
Dim strTabChar As String
Dim prp As Property
Set dbs = OpenDatabase("D:\Custord\Menlo2000.mdb"
strTabChar = vbTab
' Set Container object variable.
Set ctr = dbs.Containers(strObjectType)
' Set Document object variable.
Set doc = ctr.Documents(strObjectName)
doc.Properties.Refresh
' Print the object name to Debug window.
Debug.Print doc.Name
' Print each Object property to Debug window.
'**** This is where the Error 13 Type mismatch occurs *****
For Each prp In doc.Properties
'**********************************************************
Debug.Print strTabChar & prp.Name & " = " & prp.Value
Next
End Sub
I am trying to extract information about my Access 2000 db because I may have to analyze and rewrite most of it.
I'm referencing the properties of the containers and documents within the db and well, I'm a little over my head.
I'm getting a Type mismatch error as I try to loop thru the property values..... see the code below that is blocked-off with asterisks.
Thanks for your help. John
Sub PrintObjectProperties(strObjectType As String, strObjectName _
As String)
Dim dbs As Database, ctr As Container, doc As Document
Dim intI As Integer
Dim strTabChar As String
Dim prp As Property
Set dbs = OpenDatabase("D:\Custord\Menlo2000.mdb"
strTabChar = vbTab
' Set Container object variable.
Set ctr = dbs.Containers(strObjectType)
' Set Document object variable.
Set doc = ctr.Documents(strObjectName)
doc.Properties.Refresh
' Print the object name to Debug window.
Debug.Print doc.Name
' Print each Object property to Debug window.
'**** This is where the Error 13 Type mismatch occurs *****
For Each prp In doc.Properties
'**********************************************************
Debug.Print strTabChar & prp.Name & " = " & prp.Value
Next
End Sub