example form needed

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am new to programming forms and am hoping someone can email me an example form described below.

The form I want to create will allow me to "categorize" an individual.
1) The form will allow me to select an individual from a combo-box (the individual is stored in TABLE1).
2) There are many categories to pick from (categories stored in TABLE2)
3) The individual can belong to multiple categories so I want to be able to select the categories within a datawindow of the form.
4) The selected categories will be copied to another datawindow on the form. The data in this datawindow will update a third table, TABLE3.
5) I need to be able to add, and delete categories for an individual.

Please send a sample form to wrickford-at-qwest-dot-net. If you can't email me please describe. I really appreciate your help.
-Warren
 
Table1 and Table2 have a many-to-many relationship: one person can belong
to many categories AND one category can apply to many persons. Table1 should
have a primary key, i'll call it: PersonID. Table2 should have a primary
key, i'll call it CategoryID. Table3 is the linking table between the two.
it should include a primary key field, the primary key field (foreign key)
from Table1 which i'll call fkPersonID, and the primary key field (again,
foreign key) from Table2 which i'll call fkCategoryID.
so Table1 has a one-to-many relationship with Table3, and Table2 has a
one-to-many relationship with Table3. the "important" relationship is
between Table1 (persons) and Table3 (the categories each person belongs to).
the standard expression of this relationship for data entry is a main form /
subform.
base the main form on Table1. i'll call it frmPersons.
create a second form based on Table3. i'll call it frmPersons_subCategories.
use a combo box control for the field fkCategoryID. set the RowSource of the
combo box to Table2, and make sure that the bound column is the column
showing Table2's primary key field CategoryID.
in frmPersons design view, add a subform control, from the Toolbox toolbar.
make sure the subform control is selected, then: in the Properties box,
click on the Other tab and give the subform control a name - i'll call it
sfmCategories. then click the Data tab. set the SourceObject to
frmPersons_subCategories. set Link Child Fields to fkPersonID. set Link
Master Fields to PersonID.
now when you open the main form, you can enter a person or go to the record
of an existing person, and add or delete any number of category records for
that person - directly in the subform. field fkPersonID will be entered
automatically when you add a record in the subform. all you have to do
choose a category from the combo box droplist.

hth


WarrenR said:
I am new to programming forms and am hoping someone can email me an example form described below.

The form I want to create will allow me to "categorize" an individual.
1) The form will allow me to select an individual from a combo-box (the
individual is stored in TABLE1).
2) There are many categories to pick from (categories stored in TABLE2)
3) The individual can belong to multiple categories so I want to be able
to select the categories within a datawindow of the form.
4) The selected categories will be copied to another datawindow on the
form. The data in this datawindow will update a third table, TABLE3.
5) I need to be able to add, and delete categories for an individual.

Please send a sample form to wrickford-at-qwest-dot-net. If you can't
email me please describe. I really appreciate your help.
 
Back
Top