Duane Hookom's - Outlook Styled Report Demo

G

Guest

Im hoping to catch Duane on here.

I have a copy of the Outlook Styled Report Demo and there is 3 reports that
are perfect and exactly what i need.
1/ I was hoping that i could use these reports

2/ If i am allowed to use it how do i adapt them for my database

My tables are as follows
Table name: Appointments
Field names:
ApptID
ApptDate
ApptStart
ApptEnd
WorkerID - Linked with "Workers" Table
CustID - Linked with "Customers" Table

Table name: Customers
Field names:
CustID
AreaID - Linked with areas Table
Customer
+ More but arnt related to this report

Table name: Workers
Field names:
WorkerID
Firstname
Lastname
+ More but arnt related to this report

Is there anything else that i need to add to my tables to get the report
working

I really hope you can help me
Thanks

Lee
 
D

Duane Hookom

I should be in bed but will attempt to sort this out a bit. Can you tell me
which report format you are attempting to use? You can certainly copy them
for your use, that's why I have made them available. I would prefer that you
don't claim ALL the credit for them ;-)

I would be glad to answer specific questions. I would rather not take a
shot-gun approach to replying.
 
G

Guest

Mainly the Weekly Schedule by doctor


Duane Hookom said:
I should be in bed but will attempt to sort this out a bit. Can you tell me
which report format you are attempting to use? You can certainly copy them
for your use, that's why I have made them available. I would prefer that you
don't claim ALL the credit for them ;-)

I would be glad to answer specific questions. I would rather not take a
shot-gun approach to replying.
 
G

Guest

But ill proberley need it to be 7 days
And thanks for staying up to answer my questions
 
D

Duane Hookom

Good morning. I would need specific questions. You need to try something and
then if you have a problem, we will attempt to resolve it.
 
G

Guest

Hi Duane
Thanks again for replying

I keep getting an error message "The Microsoft Jet Database engine cannot
find the input table or query 'tblschedual' Make sure it exists and that its
name is spelled correctly

Im gathering that i need to change this to my table "appointments". Where
abouts do i change this?

Thanks Lee
 
G

Guest

Duane have i changed the code correctly? cos im getting a whole heap of
Enter Parameter value message boxes - I keep clicking ok then it opens visual
basic and highlights datSchedStart = and a message popup says compile error:
varible not defined.

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 datApptstart As Date

datSchedStart = #8:00:00 AM#
lngOneMinute = 12 'number of twips in one minute
lngTopMargin = 720 'timeline starts 1/2" down in section

Me.MoveLayout = False
Me.Customer.Top = lngTopMargin + DateDiff("n", datSchedStart,
Me.ApptStart) * lngOneMinute
Me.Customer.Height = DateDiff("n", Me.ApptStart, Me.ApptEnd) * lngOneMinute
Me.Customer.Left = DateDiff("d", Me.WeekOf, Me.ApptDate) * 2160
End Sub


I think i need a bit of help.

Lee
 
D

Duane Hookom

You changed:
Dim datSchedStart As Date
to
Dim datApptstart As Date
but then tried to use datSchedStart in your code.

Try this code:
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 datApptstart As Date

datApptstart = #8:00:00 AM#
lngOneMinute = 12 'number of twips in one minute
lngTopMargin = 720 'timeline starts 1/2" down in section

Me.MoveLayout = False
Me.Customer.Top = lngTopMargin + _
DateDiff("n", datApptstart , Me.ApptStart) * lngOneMinute
Me.Customer.Height = DateDiff("n", Me.ApptStart, Me.ApptEnd) * _
lngOneMinute
Me.Customer.Left = DateDiff("d", Me.WeekOf, Me.ApptDate) * 2160
End Sub
 
G

Guest

Thanks Duane
Just out of curiosity where abouts do you live?

Anyways I changed the code and im still getting "Enter Parameter Value" for
Firstname (which comes from the table Workers)
Customer (from table Cusromers)
Doctor (i dont have this at all)
StartTime ( I have ApptStart)

And Also Microsoft Visual Basic Has a Error Message
"Run Time Error '2100'
The Control or Subform control is too large for this location"

So i clicked debug and it Highlighted the line
Me.Customer.Left = DateDiff("d", Me.WeekOf, Me.ApptDate) * 2160
In Yellow

I really grateful for all your help

Thanks again
Lee
 
G

Guest

FYI

I have fixed to parameter value issue it is just that runtime error that i
dont understand how to fix

Thanks
Lee
 
D

Duane Hookom

Hi Lee,
I live in Eau Claire, Wisconsin.

Your error 2100 is caused by the combination of your control width and left
properties being to big to fit on your page. You can decrease either the
left or width (or both) to remove the error.
 
G

Guest

Hi duane
I got rid of the error message but no i cant see the timeline down the left
or the dates accross the top.

The text box "weekof" Where is that related to or does it just look at the
current week from the computers date?
 
D

Duane Hookom

The stuff you are missing are from the WeekOf group footer. WeekOf is a
calculated column in the report's record source.
 
G

Guest

Duane
In regard to the Weekof footer and related fields. They are in ther report
and the only thing i have chaged with the fields is the format to d/m/yyyy.
 
D

Duane Hookom

If the weekof footer is in the report then it should show. Are you saying
the footer doesn't show in your report preview?
 
G

Guest

It shows in the design view - so i can see the timeline down the left and the
text boxes accross the top. But once i open the report all i see is a blank
page with one box with a customers name iin it.

Im not sure what to do. Would you like me to zip my db and email it to you?

Lee
 
D

Duane Hookom

I don't normally accept files but I will take a look at your project. You
must compact and then zip it. If there are lots of stuff in the file that
aren't needed you might want to delete some of them prior to compacting
(always work from a copy).
 
G

Guest

They are there when im in design view but once i got to print preview view
they arnt there
Did you want me to zip my db and email it to you so you can have a look?
 
G

Guest

Hi Duane
Just wondering if you got my DB? i sent it to your hotmail address.

If you didnt could you send me your email address to (e-mail address removed)
please

Thanks again
Lee
 

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