T
Tcs
I have a progress bar in my app, which used to be a separate function in each of
my modules. But as I've added to my app, it occured to me that it would be
better if I were to create a global module for things such as this. (Or so I
thought.)
I've created my global module:
Option Compare Database
Option Explicit
Global intPBOverallMax As Variant, intPBOverallValue As Variant,
intPBOverallCntr As Variant
Global intPBTaskMax As Variant, intPBTaskValue As Variant, intPBTaskCntr As
Variant
Global ctlProgBarOverall As String, ctlProgBarTask As String
Public Function fncUpdProgBar()
On Error GoTo Err_UpdProgBar
intPBOverallCntr = intPBOverallCntr + 1
intPBTaskCntr = intPBTaskCntr + 1
If intPBOverallCntr <= intPBOverallMax Then
Forms!frmProgressBar.ctlProgBarOverall.Value = intPBOverallCntr
End If
If intPBTaskCntr <= intPBTaskMax Then
Forms!frmProgressBar.ctlProgBarTask.Value = intPBTaskCntr
End If
DoEvents
Exit_UpdProgBar:
On Error Resume Next
SysCmd acSysCmdClearStatus
Exit Function
Err_UpdProgBar:
MsgBox "Error # " & Err.Number & " was generated by " & Err.Source & vbCrLf
& _
Err.Description, , "RunJob - UpdProgBar - " & Date & " - " & Time
' intUpdProgBar = False
Resume Exit_UpdProgBar
End Function
And I have commented out the corresponding code in all my other modules. But
when I try to compile, I get:
Ambiguous name detected: intPBTaskMax
But I can't find any dups. And my progress bar form looks good. Does anyone
have any idea what I'm missing?
Thanks in advance,
Tom
my modules. But as I've added to my app, it occured to me that it would be
better if I were to create a global module for things such as this. (Or so I
thought.)
I've created my global module:
Option Compare Database
Option Explicit
Global intPBOverallMax As Variant, intPBOverallValue As Variant,
intPBOverallCntr As Variant
Global intPBTaskMax As Variant, intPBTaskValue As Variant, intPBTaskCntr As
Variant
Global ctlProgBarOverall As String, ctlProgBarTask As String
Public Function fncUpdProgBar()
On Error GoTo Err_UpdProgBar
intPBOverallCntr = intPBOverallCntr + 1
intPBTaskCntr = intPBTaskCntr + 1
If intPBOverallCntr <= intPBOverallMax Then
Forms!frmProgressBar.ctlProgBarOverall.Value = intPBOverallCntr
End If
If intPBTaskCntr <= intPBTaskMax Then
Forms!frmProgressBar.ctlProgBarTask.Value = intPBTaskCntr
End If
DoEvents
Exit_UpdProgBar:
On Error Resume Next
SysCmd acSysCmdClearStatus
Exit Function
Err_UpdProgBar:
MsgBox "Error # " & Err.Number & " was generated by " & Err.Source & vbCrLf
& _
Err.Description, , "RunJob - UpdProgBar - " & Date & " - " & Time
' intUpdProgBar = False
Resume Exit_UpdProgBar
End Function
And I have commented out the corresponding code in all my other modules. But
when I try to compile, I get:
Ambiguous name detected: intPBTaskMax
But I can't find any dups. And my progress bar form looks good. Does anyone
have any idea what I'm missing?
Thanks in advance,
Tom