parameter query/report

  • Thread starter Thread starter Kara
  • Start date Start date
K

Kara

I have three tables. 1)on duty 2)off duty and 3)
supervisors.

Fields for the supervisors table are (all are primary keys)
Name, Shift, Date

In the other tables I have autonumber as the primary key.
The two tables are connected to the supervisors table in a
one-to-many relationship.

My goal of the report is to show what people worked on a
particular day for all three shifts (days, evens, mids),
with a dialog box popping up asking for the date when the
report is clicked on.

I based the report on 2 queries (on and off duty) with the
same parameter. The parameter is reading from an open
unbound text box on a form asking for a date.
[Forms]![crit]![date]
However when I put text into the unbound form, it pulls up
the report, I close the report, and then I go to close the
form, it gives me an error "Index or primary key can not
contain a Null value".

I figuare it is doing this because I am pulling the date
from the supervisors table, which is a primary key. Is
there anyway I can work around this error. When I enter
the date criteria I don't see that it is trying to add
another record into the table. What am I doing wrong??

Thanks in advance for your help
Kara
 
Back
Top