Hi all - I want to display information about an Access 2000 database. But when I define the path explicitly in the Set statement, I get a Type Mismatch error.
I copied most of this code from an Access example....
so in VB 6, I am unable to reference (or point) to the database I need info on.
Thanks for your tips! John
Function GetSummaryInfo(strPropName As String) As String
Dim dbs As Database, cnt As Container
Dim doc As Document, prp As Property
Const conPropertyNotFound = 3270
On Error GoTo GetSummary_Err
Set dbs = "D:\Program Files\Microsoft Visual Studio\VB98\Nwind.mdb" '... get Type mismatch error
Set cnt = dbs.Containers!Databases
Set doc = cnt.Documents!SummaryInfo
doc.Properties.Refresh
GetSummaryInfo = doc.Properties(strPropName)
I copied most of this code from an Access example....
so in VB 6, I am unable to reference (or point) to the database I need info on.
Thanks for your tips! John
Function GetSummaryInfo(strPropName As String) As String
Dim dbs As Database, cnt As Container
Dim doc As Document, prp As Property
Const conPropertyNotFound = 3270
On Error GoTo GetSummary_Err
Set dbs = "D:\Program Files\Microsoft Visual Studio\VB98\Nwind.mdb" '... get Type mismatch error
Set cnt = dbs.Containers!Databases
Set doc = cnt.Documents!SummaryInfo
doc.Properties.Refresh
GetSummaryInfo = doc.Properties(strPropName)