apr pillai
AWF VIP
- Local time
- Today, 10:48
- Joined
- Jan 20, 2005
- Messages
- 737
It is possible to create Custom Properties on Form and Store and Retrieve Values on Open/Close Events and I use them for different purposes. UserIDs, Passwords or any other value we like to store and retrieve them as and when needed.
Few examples here: Saving Data on Forms Not in Table
Creating Using Form Custom Properties
Create any number of Properties with proper data type as needed.
sample code:
Few examples here: Saving Data on Forms Not in Table
Creating Using Form Custom Properties
Create any number of Properties with proper data type as needed.
sample code:
Code:
Public Function CreateProp()
Dim db As Database, doc As Document
Dim prop As Property
Set db = CurrentDb
Set doc = db.Containers("Forms").Documents("Employees")
Set prop = doc.CreateProperty("EmpCode", dbLong, 1)
doc.Properties.Append prop
doc.Properties.Refresh
Set doc = Nothing
Set prop = Nothing
Set db = Nothing
End Function