Share via

Combo box default value

Anonymous
2024-03-13T01:16:09+00:00

Hi, I have a combo box on a form which is populated by a query which returns a list containing an ID and a membership year (yyyy),

e.g.

12 2001

167 2023

15 2022

80 2024

81 2010

The combo box is bound to column 1, i.e. the ID.

Although the user can select a different year from the combo box, I would like the default display entry to be the current year row.

Any suggestions how I can achieve this please.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Duane Hookom 26,825 Reputation points Volunteer Moderator
2024-03-13T01:49:57+00:00

I expect you could set the default value to something like

=DLookup("ID","Your Table","YearField = Year(Date())")

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2024-03-13T06:47:49+00:00

    Many thanks Duane, that worked great.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2024-03-13T04:37:50+00:00

    What I understand from your question that You need the display as it is showing, only after selection, the value in the text box to be year instead of ID.

    Just change the bound column to 2, it should work,

    Was this answer helpful?

    0 comments No comments