J
Jeffrey Cox
Hi Community,
I am trying to produce a kind of Gantt chart on a form.
So far, I can place each class in a text field on a register of a form, but
they appear each one on a different register,
Is it possible to have each instance of the text field on the same register
of a form so that they form a chart of a class schedule?
my code so far:
Private Sub Form_Current()
Dim lngTopMargin As Long
Dim lngOneMinute As Long 'size of one minute in twips
Dim datSchedStart As Date
datSchedStart = #8:00:00 AM#
lngOneMinute = 12 'number of twips in one minute
lngTopMargin = 720 'timeline starts 1/2" down in section
'create detail sections as 'layers'
'Me.MoveLayout = False
Me.Turma.Top = lngTopMargin + DateDiff("n", datSchedStart, Me.StartTime)
* lngOneMinute 'how far down the row to begin
Me.Turma.Height = DateDiff("n", Me.StartTime, Me.EndTime) * lngOneMinute
'how tall, the duration of the class
Me.Turma.Left = Me.Classroom * 2160 'in which column to place the text
field
End Sub
Turma is the name of the text field that is placed in different columns
(classrooms) and different times
Any help would be much appreciated.
Jeff
I am trying to produce a kind of Gantt chart on a form.
So far, I can place each class in a text field on a register of a form, but
they appear each one on a different register,
Is it possible to have each instance of the text field on the same register
of a form so that they form a chart of a class schedule?
my code so far:
Private Sub Form_Current()
Dim lngTopMargin As Long
Dim lngOneMinute As Long 'size of one minute in twips
Dim datSchedStart As Date
datSchedStart = #8:00:00 AM#
lngOneMinute = 12 'number of twips in one minute
lngTopMargin = 720 'timeline starts 1/2" down in section
'create detail sections as 'layers'
'Me.MoveLayout = False
Me.Turma.Top = lngTopMargin + DateDiff("n", datSchedStart, Me.StartTime)
* lngOneMinute 'how far down the row to begin
Me.Turma.Height = DateDiff("n", Me.StartTime, Me.EndTime) * lngOneMinute
'how tall, the duration of the class
Me.Turma.Left = Me.Classroom * 2160 'in which column to place the text
field
End Sub
Turma is the name of the text field that is placed in different columns
(classrooms) and different times
Any help would be much appreciated.
Jeff