data entry with subforms

  • Thread starter Thread starter andy
  • Start date Start date
A

andy

I need to create a primary data entry form which will
allow me to choose multiple values on a related subform.

The design is like this:

table:contacts
PK ContactID
First Name
etc.

table:relationships
PK Contact ID
PK ContactTypeID

table:ContactTypes
PK Contact TypeID
Contact Type

How do I create a "relationships" subform that allows me
to use a combo box to enter the various types of contact
we have with each individual?

I can create the subform, but when I add fields from
table:contacttypes everything gets screwy.

Please help -- I have a feeling this shouldn't be as hard
as I'm making it.

Thanks
 
Andy,

Your subform should be based on Relationships table. There is no need
to show the Contact ID field on the subform, but this will be the
LinkChildFields property setting of the subform. The ContactTypeID
field can be represented on the subform by a combobox. The RowSource
of the combobox is the ContactTypes table. Set up the combobox so its
Column Count property is 2 and the bound column is 1 (i.e. Contact
TypeID). Set the Column Widths property to 0;x where x is a suitable
width to display the Contact Type data. Now, when you use the
combobox to enter data, the Contact TypeID value from the combobox's
first (hidden) column will be entered into the Relationships table,
but its associated Contact Type is what you will see displayed on the
form.

- Steve Schapel, Microsoft Access MVP
 
Back
Top