[AccessD] Data-Driven Checkboxes

Gustav Brock Gustav at cactus.dk
Wed Jan 3 11:27:36 CST 2007


Hi Arthur

For something similar I made a small subform styled as a listbox but with a bound checkbox in the left (first) column.

/gustav

>>> artful at rogers.com 03-01-2007 17:48:26 >>>
I have a form that I want to populate using a SELECT statement based on another table. A simple example: the other table contains a list of options you might want on a computer you're considering buying: 250GB HD, 19" monitor, 20" monitor, wireless, dvd burner, etc. New components might be added to the components list at any time, and I don't want to rebuild the form every time this happens.

What I would like to do is create a checkbox control on the form with one checkbox for each component, and use the component description as the text associated with that checkbox. The checkboxes should be 3-way controls (yes, no, null). Then, code will walk through the values and do some stuff based on the Ys and Ns. As for naming the generated controls, I plan on doing something like "cbx_" + ComponentID, so that I can loop through them and check their values.

Suggestions on how to auto-create the component checkboxes?

A downstream problem that I'm not going to worry about at this stage is creating two columns of checkboxes if there isn't enough vertical space to place them all nicely.

TIA,
Arthur




More information about the AccessD mailing list