G
Guest
Basicly the query below tells me all empolyees scheduled to work on
11/01/2004. What I want to know is if any of those employees StartTime or
EndTime falls between and other employees StartTime and EndTime. If it does
then I need to change a color of a textbox to yellow.
Thanks for any help you may have.
Sub testing()
Dim db As Database, strSQL As String
Dim qdf As QueryDef, rst As Recordset
strSQL = "SELECT Main.Employees, Format(Main.C_StartTimes, 'h:nn A/P') AS
StartTime, " _
& "Format(Main.C_EndTimes,'h:nn A/P') AS EndTime, Main.Date,
Main.Clients " _
& "FROM Main WHERE (((Main.Date)=#11/01/2004#) AND
((Main.Clients)= 'Barbara C'))" _
& "ORDER BY Main.C_StartTimes;"
Set db = CurrentDb()
Set qdf = db.CreateQueryDef("", strSQL)
Set rst = qdf.OpenRecordset
End Sub
11/01/2004. What I want to know is if any of those employees StartTime or
EndTime falls between and other employees StartTime and EndTime. If it does
then I need to change a color of a textbox to yellow.
Thanks for any help you may have.
Sub testing()
Dim db As Database, strSQL As String
Dim qdf As QueryDef, rst As Recordset
strSQL = "SELECT Main.Employees, Format(Main.C_StartTimes, 'h:nn A/P') AS
StartTime, " _
& "Format(Main.C_EndTimes,'h:nn A/P') AS EndTime, Main.Date,
Main.Clients " _
& "FROM Main WHERE (((Main.Date)=#11/01/2004#) AND
((Main.Clients)= 'Barbara C'))" _
& "ORDER BY Main.C_StartTimes;"
Set db = CurrentDb()
Set qdf = db.CreateQueryDef("", strSQL)
Set rst = qdf.OpenRecordset
End Sub