J
James Frater
Hello Gang,
I've got the bit of code that copys data from the table to the FlexGrid (see
below). However I've been trying my hardest but still can't get one bit of it
to work.
I have six columns in the flexgrid (as I manage events over six locations)
and so would like it where an event from the table "tbl_events" and the field
"events_location" = 2 appears in column 2 and likewise for locations 3-6.
Any ideas chaps
Regards
JAMES
Set rst = CurrentDb.OpenRecordset("SELECT * FROM tbl_events WHERE event_date
= #" _
& Format(txtToday, "m-d-yyyy") & "#")
Do Until rst.EOF
vRow = ((Hour(rst!event_on) - 7) * 2) + 1
If Minute(rst!event_on) >= 30 Then vRow = vRow + 1
vRow2 = (DateDiff("n", rst!event_on, rst!event_off)) / 30
flxDates.TextMatrix(vRow, 1) = Nz(rst!event_name)
vRow2 = vRow2 - 1
vRow = vRow + 1
Do While vRow2 > 1
If vRow2 > 1 Then
flxDates.TextMatrix(vRow, 1) = Nz(rst!event_name)
Loop
End If
I've got the bit of code that copys data from the table to the FlexGrid (see
below). However I've been trying my hardest but still can't get one bit of it
to work.
I have six columns in the flexgrid (as I manage events over six locations)
and so would like it where an event from the table "tbl_events" and the field
"events_location" = 2 appears in column 2 and likewise for locations 3-6.
Any ideas chaps
Regards
JAMES
Set rst = CurrentDb.OpenRecordset("SELECT * FROM tbl_events WHERE event_date
= #" _
& Format(txtToday, "m-d-yyyy") & "#")
Do Until rst.EOF
vRow = ((Hour(rst!event_on) - 7) * 2) + 1
If Minute(rst!event_on) >= 30 Then vRow = vRow + 1
vRow2 = (DateDiff("n", rst!event_on, rst!event_off)) / 30
flxDates.TextMatrix(vRow, 1) = Nz(rst!event_name)
vRow2 = vRow2 - 1
vRow = vRow + 1
Do While vRow2 > 1
If vRow2 > 1 Then
flxDates.TextMatrix(vRow, 1) = Nz(rst!event_name)
Loop
End If