How tomake a name entered in a form reappear on form without retyp

C

Cheney

I have designed a form for others to capture data about clients. I want to be
able to make that client's name reappear in various fields througout the
document without having to re-type it each time. I can't remember how.
 
H

Helmut Weber

Hi Cheney,
I have designed a form for others to capture data about clients. I want to be
able to make that client's name reappear in various fields througout the
document without having to re-type it each time. I can't remember how.

I'd define a docvariable,
set the docvariable's value
to the text of the textbox on textbox change,
update the fields,
and refresh the screen,
otherwise only the first change
of the textbox's changes will be seen.

Like this:

Private Sub TextBox1_Change()
With ActiveDocument
.Variables("Myname").Value = TextBox1.Text
.Fields.Update
End With
Application.ScreenRefresh
End Sub

HTH

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 

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