Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text box default value 1

Status
Not open for further replies.

jaanisf

Technical User
Apr 30, 2003
50
LV
Is there a way to let a text box remember last entered value? I want the last entered value to be a default value. When I enter new value, other that default, the new value becomes a default value.
 
In the after update event of the text control, assign the value to the DefaultValue property of it.

[tt] ' Numbers
me!txtControl.DefaultValue = """" & me!txtControl.Value & """"
' Dates
me!txtControl.DefaultValue = "#" & me!txtControl.Value & "#"

me!txtControl.DefaultValue = chr$(34) & me!txtControl.Value & chr$(34)[/tt]

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top