Custom Registry Settings in Microsoft Access
Provided by: FMS Development Team
To store a value to the registry, use the SaveSetting command in VBA.
For example:
SaveSetting appname:="MyApp", Section:="Startup",
Key:="Top", setting:=75
This statement will make a new Key named "MyApp", a sub key named "Startup",
a String value named "Top" with a value of "75" in the following location:
HKEY_CURRENT_USER\Software\VB and VBA Program Settings\
To view the change to the registry, click on the Window Start Button and
click the Run... option. Enter: Regedit and click OK. The registry will
open, and you can browse the tree to locate the entry. (Don't delete or
modify anything, as it may have detrimental effects on your system!)
To retrieve your custom settings, you can use the GetSetting or the
GetAllSettings commands.
To delete the registry keys that you made, use:
DeleteSetting "MyApp", "Startup"
See the Microsoft Access Help File for more information.
Return to the tips page
|