|
![]()
Variables in Combo BoxesAccess Help shows a user defined function ListMondays that is used to show the next 4 Mondays from the current date, which illustrates one way of doing this. Another option would be to create a small look up table, and then check the values in the Switchboard form's OnLoad event, and amend as necessary. To my mind, both of the above options seem rather like overkill. My easy way of doing this is to: Create a combo box; And then in the combo box's OnEnter event:
This starts by creating a string that is made up of the previous year, the current year and next year, and then sets the RowSource of the combo box to this string. Finally, it sets the default value of the combo box to the current year, which is the second row in the combo box (rows are 0-indexed in combo boxes).
Copyright & Disclaimer | |||||||||||||
| Last modified at 06/06/2006 14:54:06 | ||||||||||||||