Custom row source for combo box in continuous form in Access

I also hate Access, but you must play with the cards you are dealt.
Continuous forms are a wonderful thing in Access, until you run into any sort of complexity as is commonly the case, like in this instance.

Here is what I would do when faced with this situation (and I have implemented similar workarounds before):

Place an UNBOUND combobox on the form. Then place a BOUND textBox for the field you want to edit.

Make sure the combobox is hidden behind (NOT invisible, just hidden) behind the textBox.

In the OnCurrent event fill the listBox with the necessary data. Go ahead and “Limit to list” it too.

In the OnEnter or OnClick event of the textBox give the combobox focus. This will bring the combobox to the forefront. When focus leaves the combobox it will hide itself once more.

In the AfterUpdate event of the combobox set the value of the textbox equal to the value of the combobox.

Depending on your situation there may be some other details to work out, but that should more or less accomplish your goal without adding too much complexity.

Leave a Comment