Default Value

  • Thread starter Thread starter DSmith
  • Start date Start date
D

DSmith

Is it possible to make whatever is typed in a field default until a
different value is typed in in a form?

I have a form that brings up a person and their orders. Several fields I can
make default but then it has to be maintained for changes which is
bothersome. I like to be able to just input the change in the form and have
it remain the default value for ALL records until a different value is
inputted. (Even if the form is closed.)

Thanks for any help.
 
From DSmith :
Is it possible to make whatever is typed in a field default until a different
value is typed in in a form?

I have a form that brings up a person and their orders. Several fields I can
make default but then it has to be maintained for changes which is
bothersome. I like to be able to just input the change in the form and have
it remain the default value for ALL records until a different value is
inputted. (Even if the form is closed.)

Thanks for any help.

The "even if the form is closed" makes this a little harder...
Otherwise the following can do the trick (need to put this on every
control you have that you need to carry over (and obviously change the
name to the correct control)).

Private Sub YourControlName_AfterUpdate()
Me.ActiveControl.DefaultValue = """" & Me.ActiveControl & """"
End Sub
 
Back
Top