Calculating date

D

Dan

I need to be able to get the current month and year and
put it into a text box with the specified day. For
example if the date was 11/05/03 and the user specified
the day 15 the date would be 11/15/03 this month 12/15/03
on any day next month and 01/15/04 on any day during
january.
 
F

fredg

Dan said:
I need to be able to get the current month and year and
put it into a text box with the specified day. For
example if the date was 11/05/03 and the user specified
the day 15 the date would be 11/15/03 this month 12/15/03
on any day next month and 01/15/04 on any day during
january.

In an unbound control, enter:

=DateSerial(Year(date()),Month(Date()),[ControlName])

where ControlName is the name of a control on your form in which the day
number is entered.
 

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