View Single Post
 
Old 07-29-2017, 03:55 AM
corriganc corriganc is offline Windows 10 Office 2016
Novice
 
Join Date: Jul 2017
Location: United Kingdom
Posts: 6
corriganc is on a distinguished road
Smile Genius!

Quote:
Originally Posted by gmayor View Post
There is no code in your documents as docx format does not support code.

You can use the content control exit event to perform calculations, something like the attached, but you need to name at least the relevant fields (and better still all of them) and you need to have a date value that you can add to. Your Date of Manufacture field shows only the year. You cannot add months to a year. So in the attached I have added a last examination field for the purpose of demonstration.

The code adds six months of a year to the value of that date (or nothing if the field is showing the prompt).
You are a genius!
I have no idea how you managed to do this, and I am very grateful. Could you just do me one more huge favour please?

Where you added the "Last Examination" line into the document, in order for it to calculate the "Next Examination" value, it actually needs to come from the date field which is in the black textbox at the bottom of the page.

I have included an image with this reply so that it makes more sense. If you could look into this for me please, I would be most grateful - I am going to try to work it out by myself in the meantime, but I fear that I will be just as useless this time as the first time!

Thankyou in advance, and for what you have done already.

Callum
Attached Images
File Type: jpg Template-Ammends.JPG (73.1 KB, 24 views)
Attached Files
File Type: docm template-fixed-upload.docm (39.5 KB, 11 views)
Reply With Quote