'.Top' in Calendar Report

N

nutmeg

I am attempting to build a similar style Calendar report as Duane Hookum has
shown on his website. I have changed the relevant fields and have
substituted 'RoadnameCivic' for 'Patient' name so that addresses will show up
in the time frames stead of Patient names. Everything looks the same but each
time I try to run the report, the code stops at the '.Top' and it won't go
past it. I am using Access 2002. Is anyone able to assist me with whatever I
might be doing wrong. I have checked all the widths and heights and they all
match.

The code looks like:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
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
lngTopMargin = 1440 'timeline starts 1" down in section
Me.MoveLayout = False
Me.RoadnameCivic.Top = lngTopMargin + DateDiff("n", datSchedStart,
Me.TimeAppointmentStart) * lngOneMinute
Me.RoadnameCivic.Height = DateDiff("n", Me.TimeAppointmentStart,
Me.TimeAppointmentFinish) * lngOneMinute
Me.RoadnameCivic.Left = Me.ReportColumn 'field in table
Me.CrewName.Left = Me.ReportColumn 'field in table
End Sub

Any help gratefully accepted.

IEJ
 
D

Duane Hookom

Do you have a control named "RoadnameCivic" in the detail section of your
report?
 
N

nutmeg

Good morning, always helps to have a fresh set of eyes look at something. I
went back and looked and I had changed all the Control Sources but had not
changed the Names and that seemed to be the problem. Thank you so much, I
think I can make this work for the appointment application I need.

One question I do have though is, I have a lot more Crews (Doctors) to go
across the top of the page. Can you suggest how to get them all on, say
6-9+. I have used the Report Column field and have incremented each new guy
by 2500 twips as you had shown.

Thankyou,
IEJ
 
D

Duane Hookom

You can increment the ReportColumn field by 1250 to get twice as many
columns. This value is used to determine the distance of the column from the
left margin.
 
N

nutmeg

Thank you, I'll give that a try. I haven't worked with twips before so am
not familiar with the values.

Once again, thank you for this calendar solution, it definitely is what we
need and I really appreciate your help.

Regards,
IEJ
 
D

Duane Hookom

There are 1440 twips per inch. Setting the values to intervals of 1440 will
space your columns 1" apart.
 

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