REpeat memory

J

John W. Vinson

Quesion how do you tell an access application to remember a field?

If you mean to have a Textbox or other control on a Form become "sticky",
keeping the value most recently entered as the default, you can use a little
VBA code in the AfterUpdate event of the control. Let's say you have a form
with a textbox named MyText. The code would be

Private Sub MyText_AfterUpdate()
Me!MyText.DefaultValue = """" & Me!MyText & """"
End Sub

That's four doublequotes before and after; the Default Value property of a
control (whatever the datatype of the underlying field) must be a text string,
and the quotes do this.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top