Need tommorow's date in fill-in

G

Guest

Hi there! (Usually work in Access, this is a favor for a friend.) Using W02
on XP.

I have a form with dropdown fields but one field needs to be TOMORROW'S
date. (This form is 'protected' so the dropdowns work.) (Would love to be
able to press +/- keys to move date up and down.) This is a form that a
nurse station fills out at the end of each day for the next day. SOMETIMES
they fill it out a few days in advance so it would be real nice to move it
forward and back but at least I need to allow for them to type over the date
that appears. SO, bottom line, I need a fillin field with tomorrow's date in
it that can be typed over if necessary.

Thanks to everyone in advance for any help or advice!!!
 
G

Graham Mayor

The simplest solution would be to insert a text form field and set the type
to 'date'. You can then insert any date you like.
OR
You could insert three form fields with number formats restricted to two
characters (maybe four for the year) that form the day month and year. You
could even use dropdowns?
After that it starts to get a lot more complicated, especially if you want
it to be automatic, and more so if you want to be able to manually overwrite
the result and keep the form locked.

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

My web site www.gmayor.com

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

Guest

Hi Graham,

Thanks for the fast reply! Wishing to hear different but will deal with it.
Is there a way to put a calculated field in there that is today plus one
day? (Assuming no need to edit.)

Thanks again for being here to answer questions and provide instruction!
 
G

Graham Mayor

The calculated field is easier to achieve. See
www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=249902 and download the
sample document so that you can extract the field to add days then modify it
to give the result you want.
You'll see why you need to do this when you see the field structure in that
document :)
Or you could run a macro on exit from a field - see
http://www.gmayor.com/insert_a_date_other_than_today.htm
The following macro run on exit from a form field will add the required
number of days to today's date and enter it as the result of form field
Text2. If you make that a date format field you can use whatever format you
like to present it.

Sub AddDate()
Dim myDate As Date
Dim iCount As Integer
Dim oFld As FormFields
Set oFld = ActiveDocument.FormFields
iCount = InputBox("Add how many days?", "Days", 1)
myDate = Format(Date + iCount)
oFld("Text2").Result = myDate
End Sub


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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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