I need to Change the defaultvalue of a form field and save it so that the it will have the new default value the next time I open the form. I have done this before but can't find the code.
Private Sub Form_Close()
Debug.Print Text14.Value
Dim answer
If Text14.Value <> Text14.DefaultValue Then
answer = MsgBox("Update Default Values to current Values?", vbYesNo, "Update")
If answer = 6 Then
Text14.DefaultValue = Text14.Value
Text16.DefaultValue = Text16.Value
DoCmd.Save acForm, "Start"
End If
Debug.Print Text14.DefaultValue
End If
End Sub
Thanks
Uncle Mike
Private Sub Form_Close()
Debug.Print Text14.Value
Dim answer
If Text14.Value <> Text14.DefaultValue Then
answer = MsgBox("Update Default Values to current Values?", vbYesNo, "Update")
If answer = 6 Then
Text14.DefaultValue = Text14.Value
Text16.DefaultValue = Text16.Value
DoCmd.Save acForm, "Start"
End If
Debug.Print Text14.DefaultValue
End If
End Sub
Thanks
Uncle Mike