data validation on form involving date control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have a date control on my form i coined 'On-Study Date'. can i guarantee
that the input date the user enters is at most NOT 10 years before the
current one: Date().

as fate would have it, my a2k 'Help' documentation has inscrutably chosen
this day to be the one when it won't answer the helm, i.e. is literally NO
help :-(
 
i think it works, karl. would it be possible to use the "DateAdd" function
(about which i see no help owing to the dubious behavior of my a2k's at the
present moment). i think you can structure it so that you 'add' some unit of
time days, weeks, mnths, years.
 
I tried DateAdd("y",-10, xxxx but it did not test correcty. It test as if
DateAdd("d",-10, xxxx
 
It's "yyyy" for years, not "y". "y" stands for "day of year" which, as
you've discovered, is the same as "d".
 
subtle are the ways of this are they not?

BIG thanks to you (both).

tomorrow i will probably have to call microsoft tech support and try to
decypher what's keeping the help documentation from me.

with best regards,

-ted
 
hi doug:

you know i didn't actually attempt the repair until after i sent my reaction
to the posting.

i just tried
DateAdd("yyyy",-10,[On-Study Date]) And <=Date()

in the validation field of "On-Study Date" and it does NOT work.

karl dewey's did continue to, though.
 
never mind guys, i figured it out :-)

Douglas J. Steele said:
It's "yyyy" for years, not "y". "y" stands for "day of year" which, as
you've discovered, is the same as "d".
 

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

Similar Threads


Back
Top