Is this possible???

G

Guest

I would like to have a field on my form which will allow me to add "x" number
of days to a date in that form so that I can project when certain items
contingent on the date are to take place. Can I do it?
 
S

Steve Schapel

NC_Sue,

You can place an unbound textbox on the form, set its Format property to
a suitable date format, and set its Control Source property to the
equivalent of this...
=[YourExistingDateField]+x
 
G

Guest

That didn't do it - I got the dreaded "? name" error message in the box on
the form. Thanks for trying to help, though!
--
Thanks for your time!


Steve Schapel said:
NC_Sue,

You can place an unbound textbox on the form, set its Format property to
a suitable date format, and set its Control Source property to the
equivalent of this...
=[YourExistingDateField]+x

--
Steve Schapel, Microsoft Access MVP

NC_Sue said:
I would like to have a field on my form which will allow me to add "x" number
of days to a date in that form so that I can project when certain items
contingent on the date are to take place. Can I do it?
 
S

Steve Schapel

NC_Sue,

I think you will need to be more specific. What exactly is the
expression you typed into the Control Source of the textbox? What is
the name of the text box? What is "x number" in your original question,
and where does this value come from? This is very easy, but you need to
give us more information before we can do more than shoot in the dark.
Thanks.
 
G

Guest

Hi Steve.
I suspect the problem is that I don't want to assign the same value to "x"
but rather to be able to type a number (i.e. "7" for one week, "14" for two
weeks" in the box on the form. That's really what I want to do. Possible?
 
G

Guest

Very easy HOW? It's not very easy for me!
The field I want to add days to is "D1Tx". So what should I enter in my new
field on the form? =[D1Tx]+x did not work.
 
S

Steve Schapel

NC_Sue,

=[D1Tx]+7
or
=[D1Tx]+14
or, if the 7/14 value is in another control on the form, let's say it is
called DaysToAdd, then like this...
=[D1Tx]+[DaysToAdd]

The textbox you are putting this expression into should not be named
D1Tx. D1Tx should be a Date/Time data type field. The textbox should
have its Format property set to a date format.
 

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