FlexGrid Colums

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
 

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

Similar Threads

Checking dates via a select query? 2
Not stopping at text box 1
Run time error 3075 2
Form Losing Focus 0

Top