Help with a datagrid? Set of Checkboxes? TIA

  • Thread starter Thread starter Fred
  • Start date Start date
F

Fred

I have a list of items that I want to associate with each client
record. For example there are 15 possible modules a client may own.
The client may own one or many of these. Within the client record I
would like to be able to put a checkbox beside each item the client
owns showing which ones are owned and which ones are not. I should
then be able to do a query by an individual item or items showing
which clients own those items.

It seems to me this should be fairly simple but I am stumped. Clearly
a options box doesn't seem appropriate because with an options box you
can only choose one of several items.

Can anyone point me in the right direction to get me started or
suggest where I might find examples, etc.?

Thanks very much.
Fred
 
How many tables? I see three minimum required.

Modules
ModID
ModuleName

Clients
ClientID
ClientName


Client_Modules
ClientID
ModID
Owns (this really isn't necessary if we only put records in the table
where the client owns the module)

Modules should have the 15 different modules. Clients should have the
clients. And for Client_Modules, each client would have each of the 15
modules from Modules. Or....and this is better in my mind, just put the
modules in Client_Modules that the client owns. You can then just create a
query with a Left join and see who does and doesn't own the modules.
 
Ok - i agree with u on the number of tables - although there is a
great deal more to the database but for this portion of it 3 would be
right.

With our large number of clients this requires continual update by a
variety of persons so some sort of checkbox structure in a form seemed
appropriate for updating. Can you suggest how I would put that
together from this structure?

Thanks for your help.
Fred
 
Yes...I suspected there was a lot more to your database, but you followed
along it seems. :o)

One way to do this would be to automatically append from Modules to
Client_Modules whenever a client is added (ie., Form After_Update). Then
all of the records are there, and someone just needs to check the box
indicating they own it....but you should believe it that people will neglect
to do that! Don't add records to a table automatically and trust that
someone is going to do their job, because you'll have a lot of garbage
records in no time. And it will be even worse if you have multiple people
working in it.

Alternatively, going back to my thought about not storing records in
Client_Module for modules that are not owned. You could have a list box on
the client form with a list of the modules, and then in the double click
event for the list box or from a command button, add the record the user
selected in the list box. The user would add each module the client owns,
and that would be it....no more difficult than going to the records and
checking a box. But you've involved them in adding the record vs doing it
automatically and hoping they'll follow through on the rest of the task.
So, you'd have a list box, and then a subform along side it...the subform
would contain records from Client_Modules

The alternative I'm suggesting will be better in the long run. You wouldn't
have a lot of useless records in the database...and they will be useless if
they're not maintained or entered properly...plus it is easy to use/do. And
also, less storage. Don't get too hung up on the check box idea....the
record in Client_Module IS the check box.
 
This sounds like a good way to go. I appreciate your thoughts on
multiple users. It's a recent transition and requires careful
monitoring. Thanks for your help - I'll give it a go!

Fred
 
Back
Top