How to Set an Access Combo Box Default to the Current Year
Question details
The user needs to configure a Microsoft Access combo box to automatically default to the current year, retrieving the corresponding ID from a table.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Designing a data entry form in Microsoft Access where a combo box needs to automatically populate with the current year's record.
- Observed behavior
- The combo box requires manual selection of the year or ID. The user wants it to automatically display the current year upon opening the form or creating a new record.
Ensure you know the exact names of your source table, the ID field, and the Year field in your database before applying the function.
Use the DLookup Function to Set the Default Value
Apply the DLookup function in the combo box properties to automatically fetch and display the ID associated with the current year.
By utilizing the DLookup function, Microsoft Access can evaluate the current date and retrieve the matching record ID from your specified table automatically.
Right-click your form in the Access navigation pane and select 'Design View'.
Select the combo box you want to modify, then press 'F4' on your keyboard to open the Property Sheet.
Navigate to the 'Data' tab in the Property Sheet. In the 'Default Value' field, enter: =DLookup("ID", "Your Table", "YearField = Year(Date())"). Replace 'ID', 'Your Table', and 'YearField' with your actual database field names.
If you want the combo box to visually display the year instead of the numeric ID, stay on the 'Data' tab and change the 'Bound Column' property to 2 (or whichever column corresponds to the year in your Row Source).

Looking for a Lightweight Microsoft Office Alternative?
While WPS Office does not include a database management tool like MS Access, it provides powerful, free alternatives for Word, Excel, and PowerPoint. It is highly compatible with Microsoft Office formats, making everyday document processing seamless and efficient.
- 1. Download the Installer: Visit the official WPS website and download the free WPS Office installer.
- 2. Install WPS Office: Run the setup file and follow the quick on-screen instructions to install the suite.
- 3. Open and Edit: Launch WPS Office and immediately start opening or editing your Microsoft Office documents without formatting issues.

Frequently Asked Questions
Why is my DLookup function returning a #Name or #Error value?
This usually happens if the table name or field names in your DLookup formula are misspelled. Verify your spelling and ensure that any names containing spaces are enclosed in square brackets.
Can I set the combo box default value to the current month instead of the year?
Yes. You can modify the criteria in your DLookup function to match the current month by using 'MonthField = Month(Date())' instead of the Year function.
Why does my combo box display a number instead of the actual year?
Your combo box is likely bound to the ID column, which is usually Column 1. To display the text of the year, change the 'Bound Column' property in the Data tab to the column number that contains the year, such as Column 2.




