J
James Bertino
i'm using this to find the modified date of my mdb file. what am i doing
wrong?
-------------------------
Public Function GetGeneralInfo(sPropName As String) As String
Dim dbs As Database
Dim cnt As Container
Dim doc As Document
Dim prp As Property
Const conPropertyNotFound = 3270
On Error GoTo GetGeneral_Err
Set dbs = CurrentDb()
Set cnt = dbs.containers!Databases
Set doc = cnt.documents!GeneralInfo
doc.Properties.Refresh
GetGeneralInfo = doc.Properties(sPropName)
GetGeneral_Bye:
Exit Function
GetGeneral_Err:
If Err = conPropertyNotFound Then
Set prp = doc.createProperty(sPropName, dbText, "None")
doc.Properties.Append prp
Resume
Else
GetGeneralInfo = "Sorry"
Resume GetGeneral_Bye
End If
End Function
wrong?
-------------------------
Public Function GetGeneralInfo(sPropName As String) As String
Dim dbs As Database
Dim cnt As Container
Dim doc As Document
Dim prp As Property
Const conPropertyNotFound = 3270
On Error GoTo GetGeneral_Err
Set dbs = CurrentDb()
Set cnt = dbs.containers!Databases
Set doc = cnt.documents!GeneralInfo
doc.Properties.Refresh
GetGeneralInfo = doc.Properties(sPropName)
GetGeneral_Bye:
Exit Function
GetGeneral_Err:
If Err = conPropertyNotFound Then
Set prp = doc.createProperty(sPropName, dbText, "None")
doc.Properties.Append prp
Resume
Else
GetGeneralInfo = "Sorry"
Resume GetGeneral_Bye
End If
End Function