By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,483 Members | 3,229 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,483 IT Pros & Developers. It's quick & easy.

Need help updating record (or combobox)

P: n/a
I have three tables: Courses (Key is Autonumber Course Number, also have
Text Course Name); Instructors (similar fields); and Courses and Instructors
(have a combination of the four fields).

Currently, if I manually select the course from the drop-down box, the
Course Number, and the same with the Instructor fields, then I can save the
record. If the Course Number doesn't match the Course Name, though, I'm out
of luck.

What I really want is, when I choose the Course Name in my Courses and
Instructors combo box on the from I made for it, for Access to do the
following:

--Look in the Courses table.
--Find the Course Name in the Courses table that corresponds to the Course
Name I chose in the Courses and Instructors form's combo box.
--Find the matching Course Number that corresponds to the Course Name in
that
table.
--Fill in the Course Number (in the Courses and Instructors form or table)
with the Course Number it found in the previous step.

So, I know how to break down the procedure I want it to do, but I don't know
how to tell Access to do this.

Please, anybody: Can you help me to translate these instructions into a
procedure that Access will understand?

Thanks,
Eric

Oct 7 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Eric IsWhoIAm" <re******@postnewsmessage.comwrote in
news:hR*************@newsfe06.lga:
I have three tables: Courses (Key is Autonumber Course Number,
also have Text Course Name); Instructors (similar fields); and
Courses and Instructors (have a combination of the four fields).

Currently, if I manually select the course from the drop-down box,
the Course Number, and the same with the Instructor fields, then I
can save the record. If the Course Number doesn't match the Course
Name, though, I'm out of luck.

What I really want is, when I choose the Course Name in my Courses
and Instructors combo box on the from I made for it, for Access to
do the following:

--Look in the Courses table.
--Find the Course Name in the Courses table that corresponds to
the Course Name I chose in the Courses and Instructors form's
combo box. --Find the matching Course Number that corresponds to
the Course Name in that
table.
--Fill in the Course Number (in the Courses and Instructors form
or table) with the Course Number it found in the previous step.

So, I know how to break down the procedure I want it to do, but I
don't know how to tell Access to do this.

Please, anybody: Can you help me to translate these instructions
into a procedure that Access will understand?

Thanks,
Eric
Eric, the problem is that your Course-Instructor table should have
only the two foreign keys, not the names as well, to view course,
coursename, instructor and instructorname, you do not vieww the
table, but a query that looks up the course name on the course
number, and the instructor's name on the instructor's number.

That's what comboboxes do. They display the instructor name, but put
the instructor number in the table.

Just create a form with two comboboxes, in the first combobox, the
combobox has the two fields from the course, showing the name, but
linking hte number. the second combobox has the instructor number
and name.Set the bound column of each combobox to the number, the
control source to the number field in your courses-instructors
table, and the width of the number columns in each combo box to 0,
so that you see the names.


--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Oct 7 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.