(OK I did post this in the reports forum but it's probably more of a coding issue - my appologies in advance - I'm not really in the habit of multiposting - honest
)
Hi all,
I was wondering if it was possible to create textboxes on the fly in a report using code.
Something like this:
Dim YearMatrix(1 To 31, 1 To 12) As TextBox
Private Sub Report_Open(Cancel As Integer)
Dim x, y As Integer
For x = 1 To 31
For y = 1 To 12
Set YearMatrix(x, y).Left = x
Set YearMatrix(x, y).Top = y
Set YearMatrix(x, y).Width = 1
Set YearMatrix(x, y).Height = 1
Set YearMatrix(x, y).Visible = True
Set YearMatrix(x, y).Border = 1
Next y
Next x
End Sub
As you may have guessed I'm looking for a quick way to draw up a year calendar that I can populate with text on the fly.
Am I on the right track - or do I need something completelty different?
Any help/ideas greatfully received.
PS I'm not looking for any pre-written code - I'd like to know how to do it rather than just leaching.
TTFN
Marc
Hi all,
I was wondering if it was possible to create textboxes on the fly in a report using code.
Something like this:
Dim YearMatrix(1 To 31, 1 To 12) As TextBox
Private Sub Report_Open(Cancel As Integer)
Dim x, y As Integer
For x = 1 To 31
For y = 1 To 12
Set YearMatrix(x, y).Left = x
Set YearMatrix(x, y).Top = y
Set YearMatrix(x, y).Width = 1
Set YearMatrix(x, y).Height = 1
Set YearMatrix(x, y).Visible = True
Set YearMatrix(x, y).Border = 1
Next y
Next x
End Sub
As you may have guessed I'm looking for a quick way to draw up a year calendar that I can populate with text on the fly.
Am I on the right track - or do I need something completelty different?
Any help/ideas greatfully received.
PS I'm not looking for any pre-written code - I'd like to know how to do it rather than just leaching.
TTFN
Marc