Search code examples
ms-accesscomboboxdefault-valuems-access-2016

Set default value in a Microsoft Access combo box to current month


I have a column "Month" in my MS Access 2016 Database Record whose month value say "January" or "February" should be entered using a combo box with the following;

Row Source Type: Value List

Row Source: "January";"February";"March";"April";"May";"June";"July";"August";"September";"October";"November";"December"

Default Value: Month(Date())

However, to simplify work, most months will be entered in the actual current month, this can also be changed using a combo box selection in a case where it is an old entry, the combo box is working just fine, unfortunately, '''Month(Date())''' is not working but only populating the field with the whole string "Month(Date())" as the entry.

What should I put on my Default Value in order for this combo box to automatically return the current month in words, like "January" or "February" .


Solution

  • Use following expression to default value property-

    =Format(Date(),"mmmm")
    

    enter image description here