Form Date Autofill Field

G

Gabriella777_2

In a form I would like to put an autofill field that will insert the date the
form was filled in. But when it is opened at a later date, I do not want the
date to change to the day the form is opened.
How do I accomplish this?
 
G

Greg Maxey

Use a { CreateDate } vice { Date } field.


Gabriella777_2 said:
In a form I would like to put an autofill field that will insert the
date the form was filled in. But when it is opened at a later date, I
do not want the date to change to the day the form is opened.
How do I accomplish this?
 
G

Graham Mayor

If you insert a Createdate field in your form, it will reflect the date the
form was created from the form template. If you insert a Date field it will
show the system date from the PC.
If you insert a Current date form field it will behave like a Date field.
If you insert a Date form field you will need a macro to autofil the current
date on entry to the field eg

Sub FillFormDate()
ActiveDocument.FormFields("Text1").Result = Format(Date, "dd/MM/yyyy")
End Sub

where text1 is the form field bookmark name and dd/MM/yyyy is the date
pattern

If you want to insert today's date in a document that you are opening to
edit, and not have it update, then you cannot do that without a macro and
that won't be of much use unless you know your users will allow the macro to
run.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Gabriella777_2

Thanks for the help.
I did find the CreateDate, however, after talking to the person I was
creating the form for, I end up using some drop downs.
One for the month and one for the last 2 of the year. And a text box for
the day.
Thanks for everything.
 

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