G
Gina Whipp
Hey Guys (and Gals),
What I would like is if an Associate has more than one activity on any
single day it should show them all. (This end result shows in a calendar
style report.) Right ow it only shows the first activity. I have marked
what I think is the offending line (<--THIS LINE), any ideas without me
rewriting the whole thing?
Function FillCdays()
On Error Resume Next
Dim irow As Integer
Dim icol As Integer
Dim tuseday As String
Dim tcheckday As String
Dim ans As String
Dim db As DAO.Database
Dim qd As QueryDef
Set db = CurrentDb()
Dim rs As DAO.Recordset
Set qd = db.QueryDefs("qryFillCDays")
qd!FindMonth = Format([scrCDate], "m")
qd!FindYear = Me.txtYear
Set rs = qd.OpenRecordset()
Dim Done As Integer
Done = 0
If rs.EOF And rs.BOF Then
Else
Do Until rs.EOF
If Trim(rs!NameActivity & "") = "" Then
Else
ans = ""
For irow = 0 To 6
For icol = 0 To 9
tuseday = rs!Day
tcheckday = Trim(Left(Me("lbl" & irow & icol), 2))
If tcheckday = tuseday Then
Me("lbl" & irow & icol) = Me("lbl" & irow & icol) & vbCrLf
& rs!NameActivity <--- THIS LINE
Me("lbl" & irow & icol).FontWeight = 500
End If
If Done = 1 Then Exit For
Next icol
If Done = 1 Then Exit For
Next irow
End If
rs.MoveNext
Done = 0
Loop
End If
rs.Close
End Function
What I would like is if an Associate has more than one activity on any
single day it should show them all. (This end result shows in a calendar
style report.) Right ow it only shows the first activity. I have marked
what I think is the offending line (<--THIS LINE), any ideas without me
rewriting the whole thing?
Function FillCdays()
On Error Resume Next
Dim irow As Integer
Dim icol As Integer
Dim tuseday As String
Dim tcheckday As String
Dim ans As String
Dim db As DAO.Database
Dim qd As QueryDef
Set db = CurrentDb()
Dim rs As DAO.Recordset
Set qd = db.QueryDefs("qryFillCDays")
qd!FindMonth = Format([scrCDate], "m")
qd!FindYear = Me.txtYear
Set rs = qd.OpenRecordset()
Dim Done As Integer
Done = 0
If rs.EOF And rs.BOF Then
Else
Do Until rs.EOF
If Trim(rs!NameActivity & "") = "" Then
Else
ans = ""
For irow = 0 To 6
For icol = 0 To 9
tuseday = rs!Day
tcheckday = Trim(Left(Me("lbl" & irow & icol), 2))
If tcheckday = tuseday Then
Me("lbl" & irow & icol) = Me("lbl" & irow & icol) & vbCrLf
& rs!NameActivity <--- THIS LINE
Me("lbl" & irow & icol).FontWeight = 500
End If
If Done = 1 Then Exit For
Next icol
If Done = 1 Then Exit For
Next irow
End If
rs.MoveNext
Done = 0
Loop
End If
rs.Close
End Function