[AccessD] Data-Driven Checkboxes

Charlotte Foust cfoust at infostatsystems.com
Wed Jan 3 11:09:04 CST 2007


It would be easier to take the approach the Switchboard Manager uses and
create the checkboxes and their associated labels hidden, then just set
the control sources, populate the labels, and show the ones you need to
use from code.  I used to do something like this when building
telemarketing data entry forms.  

Charlotte Foust 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
artful at rogers.com
Sent: Wednesday, January 03, 2007 8:48 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Data-Driven Checkboxes

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


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list