Connecting Tech Pros Worldwide Help | Site Map

Using Dlookup

  #1  
Old November 13th, 2005, 06:22 AM
thx606@cablespeed.com
Guest
 
Posts: n/a
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

  #2  
Old November 13th, 2005, 06:22 AM
Phil Stanton
Guest
 
Posts: n/a

re: Using Dlookup


How are the professor & course related??

<thx606@cablespeed.com> wrote in message
news:1103089303.346277.228700@c13g2000cwb.googlegr oups.com...[color=blue]
> 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
>[/color]


  #3  
Old November 13th, 2005, 06:23 AM
David
Guest
 
Posts: n/a

re: Using Dlookup


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.

  #4  
Old November 13th, 2005, 06:23 AM
Tony D'Ambra
Guest
 
Posts: n/a

re: Using Dlookup


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


<thx606@cablespeed.com> wrote in message
news:1103089303.346277.228700@c13g2000cwb.googlegr oups.com...[color=blue]
> 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
>[/color]


  #5  
Old November 13th, 2005, 06:24 AM
Phil Stanton
Guest
 
Posts: n/a

re: Using Dlookup


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" <thx606@cablespeed.com> wrote in message
news:1103130725.205300.199960@c13g2000cwb.googlegr oups.com...[color=blue]
> 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.
>[/color]


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
using Dlookup with dates and > sign reginaldmerritt answers 3 November 28th, 2007 05:12 PM
Using Dlookup to generate an IIf statement Mark1978 answers 4 June 15th, 2007 04:17 PM
Using dlookup twice John answers 2 June 10th, 2007 03:45 PM
Using DLOOKUP Function to fill out Multiple Text Boxes ... Is this even possible jonvan20 answers 2 December 13th, 2006 12:16 AM
USING DLOOKUP TABLES Christine Henderson answers 8 November 13th, 2005 03:01 PM