default date in a text box

H

Helen

Hello,

I have a form with two text boxes used to enter start and end dates as
report criteria.

I was wondering if there is a way to set default dates for these boxes; for
instance I would like box 1 to always display the First Date of the Current
Year i.e. 01/01/2005. The second box should display the Last Date of the
Previous Month i.e. 07/31/2005.

Is there a way to do this?

Many thanks!

Helen
 
H

Helen

Hi,

So, I added this in my Open Event for my Form:

Me.txtStartDate2 = SerialDate(Year(Date), Month(Date), 0)

But when I open the form an error appears: Sub or Function not defined.

Maybe I'm putting it in the wrong place?

Thanks!

Helen
 

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