Please lay off the CAPS LOCK key. It's hard to read and looks like
you're SHOUTING AT US.
You cannot do this in a Table, but you should be using a Form to enter
data in any case. On a Form, you can use just one line of VBA code; in
a textbox (or other control's) AfterUpdate event, put
Private Sub controlname_AfterUpdate()
Me!controlname.DefaultValue = """" & Me.controlname & """"
End Sub
The """" is needed to insert a single " character to delimit the
default value string.
I copied and pasted the VBA code you provided below and inserted in the the
AfterUpdate event line, but that didn't seem to work. Do I need to enter
anything in the parantheses or quotation marks?
I copied and pasted the VBA code you provided below and inserted in the the
AfterUpdate event line, but that didn't seem to work. Do I need to enter
anything in the parantheses or quotation marks?
The AfterUpdate event line should read [Event Procedure]. Erase what's
there; click the ... icon; and choose "Code Builder". Edit the code to
match your control and fieldnames.
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.