Automatic Field Entries

G

Guest

I have created a Form. This form is pulling information from an Employee
Information Tbl. The Tbl has the following fields: Last Name, First Name,
State, SSN & Date Hired. I would like all of the fields to be automatically
filled in once I have entered in the SSN.
There is also another Table that the Form is pulling from called Instructor
Information. There are 2 fields in this Tbl called: Instructor &
Wage/Salary. I am going to us a Combo box for the Instructor and would like
to have his/her Wage/Salary entered into the Wage/Salary field once the
Instructor is selected.
All of the information will be stored into a main Tbl called WEDNET Table.
How can this be done?
 
G

Guest

Hi, Ron.

DON'T DO IT.

That is, don't *store* these duplicate fields in your table. You don't need
or want them. Store only the foreign key, in this case, presumably, SSN.
You can get those other fields through a query. That's the power of a
relational database. If you wish just to *display* them on your form, you
can either 1) base the form on a query that contains these other fields, or
2) use the Column property of the combo box. For the latter, include all the
fields of interest in the Row Source of the CB. To display, say the 2nd
Column, in a textbox, set its Control Source to:

=YourComboBoxName.Column(1)

, columns being numbered starting with 0.

Refer to reference material on or Google "Normalization" or "Database
Normalization" for further info.

Hope that helps.
Sprinks
 
G

Guest

One other issue, Ron. It's common to misunderstand Fields and Controls.

A field is a table column, which stores a specific type of data--Text,
Number, Date, etc. Form controls--textboxes, combo boxes, etc. can be Bound
to a field in the form's underlying RecordSource, they can be a calculation,
or they can simply be Unbound, acting simply as a container for data. What
you see on a form are *controls*. To store data in them to a field, set the
ControlSource property to the name of the field.

Hope that helps. Confused me when I started in Acces..
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