Matkins
02-03-2005, 01:43 PM
OK, sorry for posting this here, but it really is a vb question. I am using access for a database, and i have a form, that has a piece of code, that whatever i type in a textbox, changes the label i have to that word upon pressing a button.
Although it updates the value of the labels caption, this is useless as it loses that data once the form is closed. i thought of using some sort of cmd, and i found cmdsave. After trying with this for ages, i realised that the save button does not save the labels caption, and that it is only in design view that you can save a new caption. i sound a bit incoherrent, but i hope u get what i am saying.
so what i need is a way of saving a labels caption to the form after i have changed it with code
if its any help here is the code, they r mainly variables.
Dim PasswordFormName As String
PasswordFormName = "Password Changer"
Private Sub PassChange_Click()
Password_Hide.Caption = NewPass
DoCmd.Save acForm, PasswordFormName
End Sub
Although it updates the value of the labels caption, this is useless as it loses that data once the form is closed. i thought of using some sort of cmd, and i found cmdsave. After trying with this for ages, i realised that the save button does not save the labels caption, and that it is only in design view that you can save a new caption. i sound a bit incoherrent, but i hope u get what i am saying.
so what i need is a way of saving a labels caption to the form after i have changed it with code
if its any help here is the code, they r mainly variables.
Dim PasswordFormName As String
PasswordFormName = "Password Changer"
Private Sub PassChange_Click()
Password_Hide.Caption = NewPass
DoCmd.Save acForm, PasswordFormName
End Sub