Word - Form Help

A

Animatrix1

Is there a way to auto populate other text fields after filling in the first
field?

Example: A real-estate lease - I fill in the Unit Number on the first page,
and the Unit number auto populates in the remaining unit number fields on the
form.

Thanks!
 
D

Dawn Crosier

Yes. You basically create an OnExit macro. I like to use string
variable as "middle men". But you can do pass the value
immediately without passing to the string variable.

Sub PopulateFields()
strBookvalue =
ActiveDocument.FormFields("bkDescriptionFirst").Result

strBookvalue2 =
ActiveDocument.FormFields("bkDescriptionSecond").Result

ActiveDocument.FormFields("bkOfficeExpense").Result =
strBookvalue

ActiveDocument.FormFields("bkOfficeExpense2").Result =
strBookvalue2

End Sub

Than assign the PopulateFields macro to the OnExit event of the
first field which will be data entered.

--
Dawn Crosier
Microsoft MVP
"Education Lasts a Lifetime"

This message is posted to a newsgroup. Please post replies and
questions to the newsgroup so that others can learn as well.

message
Is there a way to auto populate other text fields after filling
in the first
field?

Example: A real-estate lease - I fill in the Unit Number on the
first page,
and the Unit number auto populates in the remaining unit number
fields on the
form.

Thanks!
 
A

Animatrix1

Garfield - That was right on the money! Thanks.

Dawn - thanks for the reply! You should check out Garfields link - easy to
use.
 

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