Forms

K

Kevin

2 tables

Table 1 : tblContact (name address phone contactType)
Table 2 : tblContactType

How do I create a form to enter new contact records, and update the
tblContactType if a new contact has a new contactType

KevinL
 
S

Sprinks

Hi, Kevin.

A good way is to use a combo box for the Contact type. If your
tblContactType has a structure like:

ContactTypeID AutoNumber or Integer
ContactType Text

include both columns in the RowSource of the combo box, set the Bound Column
to 1, the ControlSource to the numeric field in your tblContact table, and
the ColumnWidths to 0";x", where x is large enough to display the largest
width ContactType.

The RowSource would be:

SELECT tblContactType.ContactTypeID, tblContactType.ContactType FROM
tblContactType
ORDER BY tblContactType.ContactType;

Set the LimitToList property to Yes, and then use the OnNotInList event
procedure to display an input form on which you can enter a new value.
Search the forum or Google for "Limit to List", and you will find code you
can adapt to your situation.

Sprinks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top