Unable to Add Data to Table

MNM

Registered User.
Local time
Tomorrow, 07:46
Joined
Mar 3, 2014
Messages
61
Greetings again,
My continuing saga with the instructor database has hit another snag.
I created a table to keep contact information such as address, phone number, and email address of instructors. I also modified the New Instructor Entry form to add an email address, since we usually have this when hired.
The problem arises when no such information exists for an instructor. I have attached a ‘sample’ database with all the important components and ‘sample’ data.
When I choose an instructor in which some contact information exists, the Instructor Contact Entry form performs as expected. On the other hand, if no information for an instructor exists, the information can be entered, even though the Employee Number, Family Name and Given Name fields are blank, contrary to the first case. Not only can the information can be ‘saved’ but no data appears in the table.
How do I have to set this up to get it to work for an instructor not in the table?

Again, any help is appreciated.
MNM
 

Attachments

You need to link the tables with a left join.

SELECT Instructor.EmployeeNumber, Instructor.FamilyName, Instructor.GivenName, Instructor.Nationality, Instructor.Birthdate, Instructor.NichiiGakkanStart, Instructor.InstructorType, Instructor.Status, Instructor.SchoolName, Visa.VisaType, Visa.VisaExpiry, Contact.ContactEmail
FROM (Instructor LEFT JOIN Visa ON Instructor.EmployeeNumber = Visa.EmployeeNumber) LEFT JOIN Contact ON Instructor.EmployeeNumber = Contact.EmployeeNumber;
 
JHB,
Even though the code listed is for the other form, the method worked! I looked up LEFT JOIN and found out how to do it in the query, ICEFQ, which was mad to run with the form.
Thanks a bunch!
MNM
 
You're welcome, good luck.
 

Users who are viewing this thread

Back
Top Bottom