Simonglencross said:
I'm looking for some ideas which would enable me to do the folowing.
I am currently designing a subscription database, people can
subscribe to a variety of differnet items and if they want they could
subscribe to all.
What I need to be able to do is allow the user to select any number of
subscriptions I have looked at list boxes but this only allows you to
select 1 I could possibly have more.
I have also looked at combo boxes but again I would have to have a
number of these in order for it to work connectly.
Any Idea would be much appreciated.
First you need a table of Subscriptions with fields (for example)
PersonID and ItemID. A record in this table with PersonID=X and
ItemID=Y will represent the fact that person X is subscribed to item Y.
Next you need some sort of user-interface mechanism to present the
information from this table. It is actually possible to use a list box
for this, but it involves a moderate amount of VBA code. It can be done
because you can set a list box's MultiSelect property to allow multiple
selections; however, a multiselect list box can't be bound to a table
field, so all the work needed to translate between your table of
subscriptions and the presentation of selected items in the list box has
to be done by code you write. That's one option for the user interface.
How comfortable are you with VBA?
Another option, the simplest one, is just to use a main form based on
your table of people, with a subform based the table of subscriptions I
described above. You can use a combo box on the subform for choosing
from the items available for subscription. So creating a new record in
the subform -- done by choosing an item from the combo box on the "new
record" -- is the user's means of entering a subscription for the person
represented by the main form, and the multiple records on the subform
present all the items that person is currently subscribed to. This
option is simple and requires no code, but you don't get to go "click,
click, click" in a list box to select several items for subscription.
I can imagine a third option, somewhere between the two, where you have
a subform for displaying and editing the current subscriptions, but you
also present an unbound list box on the main form that shows all the
available items (or maybe even all the items to which the person isn't
already subscribed). Then it takes just a little bit of code in the
list box's AfterUpdate event to add a record to the subform for each
item clicked in the list.