Populate one field based on value of another

R

Robert_L_Ross

Here's my question...

I want to populate Field2 based on the vaule in Field1. Field1 is a
dropdown box. If I select a specific value from that box, I want a macro to
detect the value and populate Field2, a text field.

I can't seem to find the right command in VB. Any help?!

thx!
 
G

Greg Maxey

Robert,

Assuming your dropdown is named dropdown1 and your formfield2 is named text1
then something like:

Sub PopulateField()
Dim myVar As String
myVar = ActiveDocument.FormFields("DropDown1").Result
ActiveDocument.FormFields("Text1").Result = myVar
End Sub

Run as an on exit macro form dropdown1 should do.
 

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