Automatically Input Data

K

Kathy Wilson

Hi all,
i don't know if this is the right newsgroup so please
forgive me if it isn't.

Okay, i have a subform with the following fields:

Course
Section
Hours

I would like to know if the following is possible:

I have a table that already have all of the courses, with
their corresponding sections and hours. When i do data
entry in the form i select a teacher first and then in the
subform i am putting in which course the teacher teaches.
Right now i have to manually put in the course, section
and hours. I would like to know if after i put in the
section can i have the course and hour automatically go
in. There is only 1 section per course and the hours are
set.

thanks
Kathy
 
P

PAFS

Kathy;

It seems that you are trying to match up teachers with courses. If this is
what you are doing then I would suggest that you add a new field to the
course table. This field will hold a Teacher_ID that points to the Teacher
table. Your form should then show a list of courses with a combo box to
select the Teacher. No typing at all.

It would be a poor design that would have the section and hours information
in two different tables. This should not have to be repeated. Use a query
to retrieve the information when it is needed.

Jim
 
N

Neil

Kathy,

Look into the DLookUp function in the MSAccess help files. You can set the
controls source of these fields to be something like:

=DLookUp("FieldName","TableName","SectionFieldName = '" &
Me.SectionTextBoxName & "'")

Field name = Name of the field to lookup in the table
TableName = Table name which holds the data
SectionFieldName = The field name where the section data is stored
SectionTextBoxName = The name of the section textbox (or combo e.t.c.) on
your form

HTH,

Neil.
 

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