query for scheduling

richard luft

Registered User.
Local time
Today, 13:34
Joined
Jun 4, 2004
Messages
63
Hi;I'm trying to design a query for office scheduling, which would show all times of day for schedule (eg- 8AM to 3PM at 1/2 hour intervals, as listed in my TblTime), and a column for all times to show places for the extant appointments as well as the open times available.
My tables are TblTime (fields IdTime & Ttime) and tblAppnt( fields Idappt, apdate, aptime, Idclient).
A sample SQL that I'm using is:
SELECT DISTINCT tblTime.TTime, TblAppt.IDpt
FROM tblTime LEFT JOIN TblAppt ON tblTime.IDtm = TblAppt.aptime
WHERE ((TblAppt.apdate Is Null Or TblAppt.apdate=#03/13/2004#));
This works just fine to show all necessary items, however I need to be able to select the date from a calendar form, which has fields [Mmonth],[Mday], and [Myear], and when I express the query as:
----Where ((TblAppt.apdate Is Null Or "#" & Forms![Frmcal]![MMonth] & "/" & Forms![Frmcal]![Mday] & "/" Forms![Frmcal]![MYear] & "#", it does not run, with errmsg "Can't evaluate expression.
Any suggestions as to how to correct?
TIA, Richard
 
Why not use a proper calControl where you can select an actual date?
 
Rich said:
Why not use a proper calControl where you can select an actual date?
>>>>
Yep, that works nicely. Thanks
 

Users who are viewing this thread

Back
Top Bottom