Default Button in a form

  • Thread starter Thread starter Alu_GK
  • Start date Start date
A

Alu_GK

Hey -
Access 2003, Vista.
I have fields in a form, that the default value was created in the table.
for the example the fields are 1-10 fiesld, and the default value for each
field is "OK".
I want the user to be able to change the default values of the fields from
the form itself.
something like a control that can be clicked and the value that in the
active field will be from now on the default value in the field.
thanks
 
Not really a security question, but easily answered.

Create a button or better still use the control's double-click event with
code similar to:


Private Sub txtMyTextbox_DblClick(Cancel As Integer)
Me.txtMyTextbox = Me.txtMyTextbox.DefaultValue
End Sub
 
You right, i didn't notice i was still in the security section.
I think i didn't explain my question well... so -
I want to create a botton that will change the default value to the value
that in the field in that moment.
Example: the default value is "OK" and the user needs to be able to change
the default value to "Fine" instead the "OK".
Thanks.
 
I tried to do this code, but it is not working.
I change it, and when I close the form and re-open a new record the default
value is not the new default value that I updated.
The form is open, while i update the default.
The default value define in the form (not in the table).
 
Salad said:
You can test this out. When you close a form you can use acSaveYes. Maybe
that will work. Docmd.close acform, Me.name, acsaveyes.

That will not work either. Only changes made to a form in design mode and
saved, will "stick"
 
Back
Top