Copying date from one text form field to another?

plpl78

Board Regular
Joined
May 8, 2009
Messages
87
Sorry if this has been answered somewhere else.

I have a one page word 2007 file. The file has text boxes all over it and inside those text boxes i have text form fields.

I have been trying for days to link some of the text form fields so that when a user types data in one of the text form fields it copies it to another text form field.

As an example.

The first text from field is where i want the person to enter there date of birth. The name of this text form field when you go into its properties is DOB.

I have two other text from fields that are in text boxes where i want the info from DOB to be copied once the user types in there date of birth.

Will anyone please help me with this? It's driving me NUTS!
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Let say other two textbox names are DOB1 and DOB2 then
Code:
Private Sub dob_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
    DOB1.Text = dob.Text
    DOB2.Text = dob.Text
End Sub
 
Upvote 0
Hi plpl78,

First, set the 'DOB' formfield's 'calculate on exit' property.
Second, delete the dependant formfield.
Third, insert a cross-reference where the deleted formfield was, pointing to the 'DOB' bookmark.
Repeat as necessary for the same/other formfield references.
Protect your form and off you go. No vba required!

littleiitin: Your solution is not applicable to formfields - it applies only to textboxes on a useform.
 
Upvote 0
Thanks Macropod,

I did not see that plpl78 used Word 2007. I thought it is in Excel user forms and he is writing Text boxes as Form fields. Thanks for information.
 
Upvote 0
Hi plpl78,

First, set the 'DOB' formfield's 'calculate on exit' property.
Second, delete the dependant formfield.
Third, insert a cross-reference where the deleted formfield was, pointing to the 'DOB' bookmark.
Repeat as necessary for the same/other formfield references.
Protect your form and off you go. No vba required!

littleiitin: Your solution is not applicable to formfields - it applies only to textboxes on a useform.

I'm sorry i had some of my info wrong. It's a table there are no text boxes at all. All of the data is typed into the table.

The table has a total of 20 different sections. I have text form fields in some of the sections.

Also when a user opens the form, they are only able to fill out the text form fields and nothing else. Once the form is filled out they print it and close the form. The form they fill out they do not save.

So how would i go about it now that we know its a table?

Thanks again for all your help guys :)
 
Last edited:
Upvote 0
I'm sorry i had some of my info wrong. It's a table there are no text boxes at all. All of the data is typed into the table.

The table has a total of 20 different sections. I have text form fields in some of the sections.

Also when a user opens the form, they are only able to fill out the text form fields and nothing else. Once the form is filled out they print it and close the form. The form they fill out they do not save.

So how would i go about it now that we know its a table?

Thanks again for all your help guys :)
Whether you're using textboxes makes no difference. Provided you have a 'DOB' formfield, the solution remains the same.
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top