Alex Rivera | Logout

Custom row source for combo box in continuous form in Access

Asked 2008-09-17T18:45:16.843
16

I have searched around, and it seems that this is a limitation in MS Access, so I'm wondering what creative solutions other have found to this puzzle.

If you have a continuous form and you want a field to be a combo box of options that are specific to that row, Access fails to deliver; the combo box row source is only queried once at the beginning of the form, and thus show the wrong options for the rest of the form.

The next step we all try, of course, is to use the onCurrent event to requery the combo box, which does in fact limit the options to the given row. However, at this point, Access goes nuts, and requeries all of the combo boxes, for every row, and the result is often that of disappearing and reappearing options in other rows, depending on whether they have chosen an option that is valid for the current record's row source.

The only solution I have found is to just list all options available, all the time. Any creative answers out there?

Edit Also, I should note that the reason for the combo box is to have a query as a lookup table, the real value needs to be hidden and stored, while the human readable version is displayed... multiple columns in the combo box row source. Thus, changing limit to list doesn't help, because id's that are not in the current row source query won't have a matching human readable part.

In this particular case, continuous forms make a lot of sense, so please don't tell me it's the wrong solution. I'm asking for any creative answers.

Edit
Report

2 Answers

0

What if you turn off the "Limit To List" option, and do some validation before update to confirm that what the user might have typed in matches something in the list that you presented them?

answered 2008-09-17T18:59:57.107
0

For Me I think the best way and easiest way is to create a temporary table that has all your bound fields plus an extra field that is a yeas/no field.

then you will use this table as the data source for the continuous for. You can use onLoad to fill the temporary table with the data you want.

I think it is easy after that to loop for the choices, just a small loop to read the yeas/no field form the temporary table.

I hope this will help

answered 2010-02-12T22:24:21.447

Your Answer