Set date to txtbox

R

Ruben Granados

Hi, I have to txt boxes: txtBeginDate, txtEndDate.

How do I set txtBeginDate value to the first day of the
current month?? e.g. 01/02/2004
And txtEndDate to the last day of the month? e.g.
29/02/2004
 
V

Van T. Dinh

Set the ControlSource of txtBeginDate to:

= DateSerial(Year(Date()), Month(Date()), 1)

and txtEndDate to:

= DateSerial(Year(Date()), Month(Date()) + 1, 0)

(including the equal sign).
 

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