Changing the default value in code, will only work while the form is open,
but you can do it like this:
Me.ControlName.DefaultValue = """" & Me.ControlName.Value & """"
That's 4 double quotes on either side. Use the AfterUpdate event of the
control for that code, and it should work while the form is open.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
"Alu_GK" <(E-Mail Removed)> wrote in message
news:00FDABB0-0BA3-4A8D-B985-(E-Mail Removed)...
> 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.
> --
> Alu_GK
>
>
> "Arvin Meyer [MVP]" wrote:
>
>> 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
>> --
>> Arvin Meyer, MCP, MVP
>> http://www.datastrat.com
>> http://www.mvps.org/access
>> http://www.accessmvp.com
>>
>>
>> "Alu_GK" <(E-Mail Removed)> wrote in message
>> news:331B31C3-29D6-49E9-9586-(E-Mail Removed)...
>> > 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
>> > --
>> > Alu_GK
>>
>>
>>