Default to current month in Access form field

G

Guest

Hi

i have a form in which i need to have the field default to
the current month and year. I have a combo box with a drop
down list of months and years. How do i set the properties
to default at the current month. It has to show
as "January" and "2003". Thanks
 
M

Media Lint

Private Sub Form_Load()
Me.cbMonth = Format(Date, "mmmm")
Me.cbYear = Format(Date, "yyyy")
End Sub
 

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