I know the date value is not an issue. The reason why I brought up the
inches vs. millimeters issue is because there's only one report that they
cannot preview and that's the report which I coded a graph on the report
using inches. Here is some of my code which is executed at the Detail On
format: I know it's hard to follow, but it's to give you an idea of how I'm
using inches in my code. I guess I need to find out if their regional
settings handle inches or not. I don't know if this even the problem. Just
guessing at this point. What do you think or do you still need more
information?
' Call the Drawline procedure
Select Case ReportScale
Case "100"
Call DrawLine(9.0417, 0.075)
Call RenameTitle(1, 11, 10)
Me!txtMinus = 1.075
Case "50"
Call DrawLine(9.0417, 0.15)
Call RenameTitle(1, 11, 5)
Me!txtMinus = 1.015
Case "250"
Call DrawLine(9.0417, 0.03)
Call RenameTitle(1, 11, 25)
Me!txtMinus = 1.03
End Select
Sub DrawLine(txtMarg As Double, txtScale As Double)
Dim rpt As Report, lngColor As Long, TheMarg As Double, TheStart As
Double, TheScale As Double
Dim sngTop As Single, sngLeft As Single, tempAC As String
Dim sngWidth As Single, sngHeight As Single
Dim txtendtime As Double, txttotaltime As Double, iswrap As Variant,
txtover As Double
If NullToZero(TotalTime) > 0 Then
TheStart = txtMarg - 0.1042: TheMarg = txtMarg: TheScale = txtScale:
txtendtime = EndTime: txttotaltime = TotalTime: iswrap = False
CycleTime1.Visible = False: StartTime2.Visible = False: EndTime2.Visible
= False: StartTime2 = CycleTime: CycleTime1 = CycleTime
Set rpt = Me
' Set scale to inches.
rpt.ScaleMode = 5
' Top inside edge.
If NullToZero(StartTime) <= NewStart Then NewStart = NewStart2
If (NullToZero(StartTime)) > 0 And ((NullToZero(StartTime)) <=
CycleTime) Then
NewStart = 0
If NullToZero(EndTime) > CycleTime And
[Forms]![frmScale]![frmDisplay] = 1 Then
iswrap = True
txtendtime = CycleTime
txttotaltime = CycleTime - NullToZero(StartTime)
txtover = NullToZero(TotalTime) - txttotaltime
End If
ElseIf NullToZero(StartTime) > 0 And ((NullToZero(StartTime) - NewStart)
<= CycleTime) And [Forms]![frmScale]![frmDisplay] = 1 Then
If ((NullToZero(StartTime) - NewStart) + NullToZero(TotalTime)) >
CycleTime Then
iswrap = True
txttotaltime = CycleTime - (NullToZero(StartTime) - NewStart)
txtendtime = NullToZero(StartTime) + txttotaltime
txtover = NullToZero(TotalTime) - txttotaltime
CycleTime1 = txtendtime
StartTime2 = txtendtime
Else
NewStart = Fix(NullToZero(StartTime) / CycleTime) * CycleTime
End If
ElseIf NullToZero(StartTime) > CycleTime And
[Forms]![frmScale]![frmDisplay] = 1 Then
If ((NullToZero(EndTime) - NewStart)) > CycleTime And NewStart > 0
Then
iswrap = True
txttotaltime = CycleTime - ((StartTime - NewStart))
txtendtime = NullToZero(StartTime) + txttotaltime
txtover = NullToZero(TotalTime) - txttotaltime
CycleTime1 = txtendtime
StartTime2 = txtendtime
ElseIf NullToZero(EndTime) > CycleTime And NewStart = 0 Then
NewStart = Fix(NullToZero(StartTime) / CycleTime) * CycleTime
End If
ElseIf NullToZero(EndTime) > 0 And (((NullToZero(EndTime) - NewStart) >
CycleTime)) And [Forms]![frmScale]![frmDisplay] = 1 Then
NewStart = NullToZero(StartTime)
ElseIf (NullToZero(StartTime) < NewStart) And
[Forms]![frmScale]![frmDisplay] = 1 Then
NewStart = Fix(NullToZero(StartTime) / CycleTime) * CycleTime
End If
NewStart2 = NewStart
If (NullToZero(StartTime) - NewStart) < 0 And
[Forms]![frmScale]![frmDisplay] = 1 Then
sngTop = ((NullToZero(StartTime) - CycleTime) * TheScale) + TheMarg
Else
sngTop = ((NullToZero(StartTime) - NewStart) * TheScale) + TheMarg
End If
' Left inside edge.
sngLeft = rpt.ScaleLeft
' Width inside edge.
If (NullToZero(StartTime) - NewStart) < 0 And
[Forms]![frmScale]![frmDisplay] = 1 Then
sngWidth = (((NullToZero(StartTime) - CycleTime) +
NullToZero(txttotaltime)) * TheScale) + TheMarg
Else
sngWidth = (((NullToZero(StartTime) - NewStart) +
NullToZero(txttotaltime)) * TheScale) + TheMarg
End If
' Height inside edge.
sngHeight = rpt.ScaleHeight
' Draw line as a box.
rpt.DrawWidth = 6: rpt.FillStyle = 0
Select Case FuncCode.Column(3)
Case "H"
lngColor = rgb(0, 255, 0): rpt.FillColor = rgb(0, 255, 0):
rpt.FillStyle = 4
Case "F"
lngColor = rgb(0, 255, 255): rpt.FillColor = rgb(0, 255, 255):
rpt.FillStyle = 7
Case "R"
lngColor = rgb(0, 0, 255): rpt.FillColor = rgb(0, 0, 255):
rpt.FillStyle = 3
Case "C"
lngColor = rgb(255, 0, 255): rpt.FillColor = rgb(255, 0, 255):
rpt.FillStyle = 5
End Select
If Not IsNull(ActionCode) Then
If Right(Trim([ActionCode]), 2) = "PB" Then
tempAC = Left([ActionCode], InStr([ActionCode], "PB") - 1)
Else
tempAC = Trim([ActionCode])
End If
Else
tempAC = ""
End If
If (Len(CPath) <= 8 And Len(CPath) > 0 And Not BT And tempAC = CPath) Then
rpt.FillStyle = 0
ElseIf (Len(CPath) > 8 And FuncCode1.Column(2) = CPath) Then
rpt.FillStyle = 0
End If
Me!linect1.Left = ((CycleTime * TheScale) + TheMarg) * 1440
If NullToZero(txttotaltime) > 0 Then
If ((sngWidth - (NullToZero(txttotaltime) * TheScale) -
((Me!StartTime.Width) / 1440)) * 1440) > (txtMarg * 1440) Then
Me!StartTime.Visible = True
End If
If iswrap Then
Me!CycleTime1.Visible = True
EndTime.Visible = False
Me!StartTime.Left = (sngWidth - (NullToZero(txttotaltime) *
TheScale) - ((Me!StartTime.Width) / 1440)) * 1440
If (((sngWidth + TheScale) * 1440) + Me!CycleTime1.Width) <=
Me.Width Then
Me!CycleTime1.Left = (sngWidth + TheScale) * 1440
Else
Me!CycleTime1.Left = ((sngWidth + TheScale) * 1440) -
(Me!CycleTime1.Width * Me!txtMinus)
End If
Else
Me!EndTime.Visible = txttotaltime <> 0
Me!StartTime.Left = (sngWidth - (NullToZero(txttotaltime) *
TheScale) - ((Me!StartTime.Width) / 1440)) * 1440
If (((sngWidth + TheScale) * 1440) + Me!EndTime.Width) <=
Me.Width Then
Me!EndTime.Left = (sngWidth + TheScale) * 1440
Else
Me!EndTime.Left = ((sngWidth + TheScale) * 1440) -
(Me!EndTime.Width * Me!txtMinus)
End If
End If
rpt.Line (sngTop, sngLeft)-(sngWidth, sngHeight), lngColor, B
Else
Me!StartTime.Visible = False: Me!EndTime.Visible = False
End If
If iswrap Then
NewStart = StartTime2
sngTop = TheMarg
sngLeft = rpt.ScaleLeft
sngWidth = (txtover * TheScale) + TheMarg
sngHeight = rpt.ScaleHeight
txtendtime = CycleTime + txtover
Me!EndTime2.Visible = txtover <> 0
If ((sngWidth - (NullToZero(txtover) * TheScale) -
((Me!StartTime2.Width) / 1440)) * 1440) > (txtMarg * 1440) Then
StartTime2.Visible = True
End If
Me!StartTime2.Left = (sngWidth - (NullToZero(txtover) * TheScale) -
((Me!StartTime2.Width) / 1440)) * 1440
If (((sngWidth + TheScale) * 1440) + Me!EndTime2.Width) <= Me.Width
Then
Me!EndTime2.Left = (sngWidth + TheScale) * 1440
Else
Me!EndTime2.Left = ((sngWidth + TheScale) * 1440) -
(Me!EndTime2.Width * Me!txtMinus)
End If
rpt.Line (sngTop, sngLeft)-(sngWidth, sngHeight), lngColor, B
End If
Else
Me!StartTime.Visible = False: Me!EndTime.Visible = False
End If
End Sub
Biz Enhancer said:
Okay, lets look for commonalities.
Do the offending components all use date values? If so how are these set.
Are the problems restricted to graphs or reports only?
Do they all relate to a specific table or set of queries?
If we can narrow down the problem to a particular feature of set of
features, then we may be able to programmatically change those parameters
based on the regional settings of the computer running the database.
:
Hi Biz,
Thanks for your comments, but I know it's not the build. The versions of
Access vary from 2000, 2002 and 2003. All with different service packs. I
have users here in the U.S. who also work in different versions and
everything works fine for them.
Any other ideas?
Thanks,
Sarah
:
Could be a case of different build as opposed to a country issue.
What version of Access was the application created in and what version are
they trying to run it with? As a for instance, Pivot charts work fine with
the 2003 runtime but not with the 2000 runtime.
Might pay to test it on an earlier version of Access if you can to eliminate
the difering build issue.
Hope it helps,
Regards,
Nick.
:
Does anyone know if there is a WEB site which lists the differences of
MSAccess between the U.S. and Germany? I have a database which was created
in the U.S. and sent to Germany to be used, but not everything works there.
Such as a graph which needs to be previewed doesn't work there. I'm
wondering if it's because I created the scale programmatically in inches and
the German version may only understand millimeters. Any ideas?
Thank you,
Sarah