469,934 Members | 1,581 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,934 developers. It's quick & easy.

Using Dlookup

Hello,

I'm having problems figuring this one out. I have 2 combo boxes. The
first one the user selects a professor then the second one they select
a course and that works fine. Here is my problem for a third field used
for mailing instructions. I would like to look this up in a seperate
table based off the values entered in the combo boxes. So, if
professor and Course match then that mailing instructon would appear in
the third field. I imagine I would use Dlookup for this, but dont know
how to code this.

Thank You
David

Nov 13 '05 #1
4 3010
How are the professor & course related??

<th****@cablespeed.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
Hello,

I'm having problems figuring this one out. I have 2 combo boxes. The
first one the user selects a professor then the second one they select
a course and that works fine. Here is my problem for a third field used
for mailing instructions. I would like to look this up in a seperate
table based off the values entered in the combo boxes. So, if
professor and Course match then that mailing instructon would appear in
the third field. I imagine I would use Dlookup for this, but dont know
how to code this.

Thank You
David

Nov 13 '05 #2
Originaly there were two seperate databases. One was for Entering in
Test that a professor sent to our office and one for when a student
came to take a test for a professor. Well I was thinking I could link
the table from the Test Db to the Sign In DB since the Test Database
already has alot of the info for the sign in database. That way we
could retrieve this information without us having to type it in for
every student. The Test Database and Sign in Database both have fields
for Professor, Course, and Mail. In the Sign In form the student
selects from the combo list which cascade to limit the data(The list is
based of the Test Db, but the control source is in the sign In db. For
the proctor form, this is where I need the mail fields to pull from the
test db.

Nov 13 '05 #3
DLookUp is slow.

I use this hack in my forms:

1. Plave a hidden combobox on the form, and set the RowSource to a Parameter
query based on the values in the two other comboboxes
2. In the AfterUpdate Event for each of the other comobox boxes, requery the
hidden combobox and set the value for the mailing field:
Me!txtMailingInstruction.Value = Me!cmbHiddenComboBox.ItemData(0)

--

Tony D'Ambra
Web Site: aadconsulting.com
Web Blog: accessextra.net
<th****@cablespeed.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
Hello,

I'm having problems figuring this one out. I have 2 combo boxes. The
first one the user selects a professor then the second one they select
a course and that works fine. Here is my problem for a third field used
for mailing instructions. I would like to look this up in a seperate
table based off the values entered in the combo boxes. So, if
professor and Course match then that mailing instructon would appear in
the third field. I imagine I would use Dlookup for this, but dont know
how to code this.

Thank You
David

Nov 13 '05 #4
Seems as if you want to get the information into 1 database you will have
quite a lot of work.
I think you need a table of Professors ProfID & ProfName etc
A Table of Courses CourseID CourseName, CourseDate etc
A JoinCourseProf CourceID & ProfID.
That way a professor can be involved in lots of different courses, and
equally a course can be tutored by lots of professors.
You then want Student table, Yes you guessed StudentID, StudentName,
StudentEMail.
A JoinStudentCourse - StudentID & CourseID
An Exam (Test) Table ExamID, ExamName
and finally a JoinStudentExam StudentID , ExamID, ExamDate, Marks

So a Student Form could show 2 Subforms, 1 listing Course they are on and 1
listing Exams and their results
A Course form would have 2 subforms 1 listing Profs involved with that
course, and 1 listing Students.
Needless to say eventually you will need to enforce referential integrety
between the tables.
With a bit of luck if this information is in your current tables, you should
be able to use append queries with temporary links between say ProfsNames to
get the right information into the new tables

HTH

Phil

"David" <th****@cablespeed.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
Originaly there were two seperate databases. One was for Entering in
Test that a professor sent to our office and one for when a student
came to take a test for a professor. Well I was thinking I could link
the table from the Test Db to the Sign In DB since the Test Database
already has alot of the info for the sign in database. That way we
could retrieve this information without us having to type it in for
every student. The Test Database and Sign in Database both have fields
for Professor, Course, and Mail. In the Sign In form the student
selects from the combo list which cascade to limit the data(The list is
based of the Test Db, but the control source is in the sign In db. For
the proctor form, this is where I need the mail fields to pull from the
test db.

Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Iain Miller | last post: by
8 posts views Thread by Christine Henderson | last post: by
2 posts views Thread by John | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.