Flexgrid, create date coloumns

Hi All

I stumbled onto the forum and found it to be very helpful in some of the projects I am working on..

I am currently working on a project that requires me to have a grid on the main form, where by each coloumn represents a day of the month.. The software is going to show certain things happening on each day of the month.. Dont know if that makes sense, but I have attached an image of what i need it to look like.. Once I have got the grid loaded, I will then query my DB and enter details into each grid corresponding to which row and date... I will also need to the be able to right click on any entry and edit details.. I will also need to be able to scroll left and right to view further then the current month...

Is a flexgrid the best option to accomplish what i need to do? I dont have any idea of how to achieve this, any help would be greatly appreciated...

Many Thanks
Stuart
[935 byte] By [SuperX] at [2007-11-20 11:55:00]
# 1 Re: Flexgrid, create date coloumns
try ouy this.


Private Sub GridFormat()
Dim DateInit As Date
Dim DateEnd As Date
Dim numCols As Integer

DateInit = Date
DateEnd = "31/12/2007"
numCols = DateEnd - DateInit + 2
With grid
.Rows = 4
.Cols = numCols

For i = 1 To numCols - 1
.Col = i
.ColAlignment(i) = flexAlignCenterCenter
.Row = 1
.Text = Format(Date + i - 1, "mmm")

.Row = 2
.Text = Format(Date + i - 1, "ddd")

.Row = 3
.Text = Day(Date + i - 1)
Next

End With
End Sub
hensa22 at 2007-11-9 19:31:54 >