Installation Duplicate Times

S

Stephen

I have a table as detailed below. I am wanting the user to to enter a date,
time and appoinment duration for an Installer. Then once they have done this
I want the system to look up and make sure that this installer doesn't have
an appoinment already in this time period.

Table Details:

Table Name: Quotation

Quote_ID Install_Date Install_Time Install_Duration
Installer

(Mins)
123 15/04/04 09:30 90
Chris
124 15/04/04 08:30 45
Steve
125 15/04/04 10:00 30
Chris
126 15/04/04 08:30 45
Dave
127 15/04/04 09:00 45
Steve

Then I would like to say enter the following appt, which would not be
allowed as it is between the appt_time start and end times. This is done
with the DateAdd feature of Install_Time and Install_Duration in mins.

I was given a solution for a similar as per the below query, but when I run
this I get an error stating that "The expression is typed incorrectly or it
is too complex to be evaluated." I do not understand how this can be when it
already works when I do this in the same way for the Sales Rep's.

SELECT Quotation.Quote_No, Quotation.Installer, Quotation.Installation_date,
Quotation.Installation_time, Quotation.Installation_Duration,
DateAdd("n",[Installation_Duration],[Installation_Time]) AS Finish
FROM Quotation
WHERE (((Quotation.Quote_No)<>[Forms]![Change_Date_Fitters]![Quote_No]) AND
((Quotation.Installer)=[Forms]![Change_Date_Fitters]![Installer]) AND
((Quotation.Installation_date)=[Forms]![Change_Date_Fitters]![Install_Date])
AND
((Quotation.Installation_time)<[Forms]![Change_Date_Fitters]![Finish_Time])
AND
((DateAdd("n",[Installation_Duration],[Installation_Time]))>[Forms]![Change_
Date_Fitters]![Install_Time]));

If anyone could help, it'd be appreciated.

TIA
Stephen
 

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