Ideas

  • Thread starter Thread starter Simonglencross
  • Start date Start date
S

Simonglencross

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.


Many Thanks


Simon
 
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.

Since you are using a relational database tool, you need two tables with a
one-to-many *relationship*. One table for Subscribers and one for
Subscriptions. Then you create a main form for subscribers with a SubForm for
subscriptions. Any subscriber can them have as many subscriptions as you want.
You can also add or delete subscriptions at a later date without having to make
any design changes.
 
Is there a way which I can use multiple list boxes inorder to make my
selects i.e different subscriptions ??
 
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.
 
Dirk,

I have limited knowledge of VB but I'm willing to attempt any suggestions
which you may have. I think the first suggestion you mention would be the
best, do you agree? Have you any code which I could use to point me in the
correct direction?

Many Thanks


Kind Regards
Simon
 
Simonglencross said:
I have limited knowledge of VB but I'm willing to attempt any
suggestions which you may have. I think the first suggestion you
mention would be the best, do you agree? Have you any code which I
could use to point me in the correct direction?

I think that approach may be the most effective from a user-interface
point of view, but it is somewhat more fragile in terms of data
integrity, and of course requires more coding to make it happen. If you
want to go that way, here's a link to an earlier post of mine that gives
example code.


http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&[email protected]&rnum=4
 
Back
Top