473,385 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 3272
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Bobbak | last post by:
Hello All, I am having trouble with this forum I am developing, I have this form that allows the users to add or modify employee information, and there's a text box called txtEmployeeLogin, and...
1
by: John Hargrove | last post by:
I am building a database to manage test samples in an environmental laboratory. I am learning Access as I go and don't know much about the programming aspects. I hope to make the application...
5
by: Iain Miller | last post by:
Trying to get my head round building a DB to analyse phone bills. On the surface its fairly simple - duration in seconds x cost per minute/60. The problem arises with working out what time of...
8
by: Christine Henderson | last post by:
I have a problem using the above function in the following simplified circumstance: In the lookup table called "Klms Travelled" I have 3 fields, eg: Receiver Name Receiver Suburb ...
4
by: jpr | last post by:
Hello, I have created menu bars for my access application and now would like to transfer many pieces of code in modules so that they can run using macros. I beleive this is the only way I can...
2
by: jonvan20 | last post by:
I have been having trouble with a simple Dlookup command that was Reccommended to me by a nice fellow named Vic, On the other hand I have statements like this that wont run they give me a run time...
2
by: John | last post by:
To prevent the null-error from showing up when dlookup returns false I created the code beneath which doesn't seem very elegant. How can I code this without having to use the dlookup twice? If...
3
reginaldmerritt
by: reginaldmerritt | last post by:
I'm using Dlookup to search a table for the first record it comes across that has a date >= the date i specifiy. e.g. formateddate = format(Me.SelectedDate,"mmddyy") VarX = DLookup("",...
3
by: Constantine AI | last post by:
Hi can anybody help me with this problem? I have a customer order form with a sales order line subform. The subform contains products ordered by customers, each (wooden) product can come in two...
15
by: rleepac | last post by:
This is a little complicated but I'll do my best to explain. In my db I have a table called L_AgeCorrection which has the following fields: Age, Sex, Frequency, AgeValue This is a table used to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.