John Bartow
john at winhaven.net
Thu Apr 29 09:20:33 CDT 2004
Terry,
I haven't seen anyone answer this question yet so here goes...
First off, I wouldn't recommend using reserved words for a user defined
"anything".
Here is a cutdown, basic function to recall a property:
Public Function ReadMyProp() As Variant
' Comments : Returns the database user defined property: UDPrp
' Returns : Variant
On Error GoTo Error_Proc
Dim db As DAO.Database
Dim prp As DAO.Property
Set db = CurrentDb
Set prp = db.Properties("UDPrp")
ReadMyProp = prp
Exit_Proc:
Set prp = Nothing
Set db = Nothing
Exit Function
Error_Proc:
If Err = 3270 Then
'Error 3270 means that the property was not found.
Else
'Add additional Error Handling here
End If
GoTo Exit_Proc
End Function
HTH
John R. Bartow
WinHaven LLC
PO Box 130
Winneconne, WI 54986
920-582-7574
john at winhaven.net
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of MACE, Terry
Sent: Tuesday, April 27, 2004 9:54 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] User Defined Properties A97
I'm trying to use a custom property to store some changing information,
which works fine, but when I try to read it, it only returns the value that
was present when the database was opened.
Is this the way it works or can I read the changed info. I'm using the
following code to read the property 'Reference':
DBEngine(0)(0).Containers("Databases").Documents("UserDefined").Properties("
reference")
Terry Mace
--
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com