placing textfields in a specific place

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
 
N

NevilleT

Hi Jeffrey

I have played with Gantt charts in Access for a while and basically gave up
on forms. I was using a chart object (stacked bar running horizontally) but
it was flakey.

Ended up using a datasheet to capture tasks, dates and duration, and a
report to display the Gantt. You can use the Detail event in the report to
manipulate a line for the Gantt. Left= start date, width = duration. Lots
of calculations involved. Things like going out of the display width etc.

I did a lot of research before going down this path. Have never seen a
successful Gantt Chart form in Access. Would be interested to see if anyone
has done it.
 
J

Jeffrey Cox

Thanks NevilleT

I took your advice and played around with the report... got something like
what I want. I would have liked it on a form so that the user could make
one or two changes directly on the form...

Much appreciate your help.

Jeff
 

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

Top