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).
 
Top