PDA

Click to See Complete Forum and Search --> : Saving Input Data


czaries
Jan 26th, 2000, 09:59 AM
Say I had the following:
- Checkbox1 is CHECKED
- Checkbox2 is NOT CHECKED
- Text1 has the text "Save me"

How would I save it that way to a preference file so I could load it for use later? Please help me, and the names of the elements are as listed, please keep them the same in your example, so I can quickly identify them. If not, don't worry about it.

------------------
Webmaster Czaries
http://www1.50megs.com/css

David Laplante
Jan 26th, 2000, 10:14 AM
Look in the help for SaveSetting and GetSetting function. it saves information in the windows registry.

Hope that helps!

WadeD
Jan 26th, 2000, 09:35 PM
Czaries,
Here's an example of saving the form position (in form_unload) and then retrieving it (in form_load).


Form_Unload()
With Me
SaveSetting "KMSystems", sSectionName, "Top", Me.Top
SaveSetting "KMSystems", sSectionName, "Left", Me.Left
End With

Form_Load()
sSectionName = username & "-Startup"

With Me
.Top = GetSetting("KMSystems", sSectionName, "Top", 0)
.Left = GetSetting("KMSystems", sSectionName, "Left", 0)
End With

czaries
Jan 27th, 2000, 06:47 AM
Thanks guys for the help, but I meant like actually writing the data to a file, so the users could save/load multiple prefrence settings.