Need help with form for school phones

A

Aria

I'm trying to design a form for phones in my school database and I have run
into problems. I don't know where I have gone wrong because I have tried so
many different ways.

We have employees who have district cell phones and employees who work out
of a classroom. There can be many employees working out of the same classroom
as well as many employees assigned to the same office phone as well as solely
assigned to their direct line phone.
I have a phone table, an employee table as well as a junction table
(tblPhoneEmps).

I have a combo Phone Search box with the following SQL:
SELECT tblPhones.PhoneID, tblPhones.PhoneNumber, tblPhones.PhoneDescription
FROM tblPhones
ORDER BY tblPhones.PhoneNumber;

I then have an option group with the phone type as the Control Source.
The values are:
District Cell (option value; 1) Campus Phone (option value; 2)

There are 2 text boxes:
1. Phone Number
2. Description (which will be used to convey the location).

Then there is a subform, Phone Associations, to assign an employee to the
particular phone #.

I have received the following messages:
1. "You tried to assign the Null value to a variable that is not a Variant
data type." This occured when I tried to use the combo box to assign an
employee.

2. "The Microsoft Jet database engine cannot find a record in the table
'tblPhones with key matching field(s) PhoneID. So I added PhoneID to the
qryPhoneAssociations.

3.Now it says,"Index or Primary key cannot contain a Null value."

I'm confused now. I don't know how to fix it. I hope I have given you enough
information.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top