Memory

  • Thread starter Thread starter EjFizzy
  • Start date Start date
E

EjFizzy

When there is a text box on a form, is it possible that the text entered be
remembered for next time
 
When there is a text box on a form, is it possible that the text entered be
remembered for next time

Yes. You can put VBA code in the textbox's AfterUpdate event:

Private Sub controlname_AfterUpdate()
Me!controlname.DefaultValue = Chr(34) & Me!controlname & Chr(34)
End Sub

The DefaultValue property needs to be a text string - hence the
quotemarks, chr(34) - and this code sets the default value to the
control's current value.
 
You know when you are typing in excel and you enter in a few letters and it
comes up with a possible word/match that you have used previously - thats
what i want this text box to do.

I tried the code and didnt do what I wanted
 
You know when you are typing in excel and you enter in a few letters and it
comes up with a possible word/match that you have used previously - thats
what i want this text box to do.

I tried the code and didnt do what I wanted

It does what you *asked for*. Sorry my telepathy wasn't working
correctly to intuit what you *actually wanted*.

A Textbox doesn't provide this capability (not without a fair bit of
VBA code), but you can use a Combo Box instead - it will autocomplete.
 
Back
Top