Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box Default Value

Status
Not open for further replies.

RGarcia87

Technical User
Jun 24, 2002
506
US
I have a form with a combo box with a list of months. How can I get it to default to the previous month? This is what I currently have in the properties of the combo box (=Format(Date(),"mmm-yyyy")). Currently, if defaults to the current the 1st day of the current month.
 
=Format(Date()-Day(Date()),"mmm-yyyy") 'yields last day of prior month
-or-
=Format(DateSerial(Year(Date()),Month(Date())-1,Day(Date()),"mmm-yyyy")
'yields 1st day of prior month
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top