Creating Properties

ashley25

Registered User.
Local time
Today, 06:48
Joined
Feb 17, 2013
Messages
46
I am trying to create a property through the following code

Public Sub refresh()
Dim prp As DAO.Property
Set prp = CurrentDb.CreateProperty("LastRefreshedDate", dbDate, Date)
End Sub

I have created the following to store the LastRefreshedDate and then present this on a user form via a caption label, however, its not working, any ideas?

' Store refresh date
CurrentDb.Properties("LastRefreshedDate") = Date
lblRefresh.Caption = "Last Refreshed: " & Format(CurrentDb.Properties("LastRefreshedDate"), " dd mmm yyyy")
 
I was missing the append element when creating the property, all fixed now.

CurrentDb.Properties.Append prp
 

Users who are viewing this thread

Back
Top Bottom