H
Hank Rouse
I found this, Free chapter from the Access Cookbook: How to Create a Generic
Reusable
Status Meter
http://msdn.microsoft.com/library/d.../en-us/dnacbk02/html/ODC_CookbookChapter9.asp
However I am having a problem with it. My module looks like this:
What am I missing, or what it is I have that I shouldn't have. Rather new
to Macros, and did the upgrade Macro funtion.
Option Compare Database
'------------------------------------------------------------
' Pre_Scrub
'
'------------------------------------------------------------
Function Pre_Scrub()
On Error GoTo Pre_Scrub_Err
' Turn OFF Warnings
DoCmd.SetWarnings False
' Open Status Form
DoCmd.OpenForm "frmStatusMeter", acNormal, "Call
acbInitMeter(""Pre-Scrub Progress"", True) ", "", , acNormal
' A
DoCmd.OpenQuery "Scrub_A", acViewNormal, acEdit, fOK =
acbUpdateMeter(25)
' B
DoCmd.OpenQuery "Scrub_B", acViewNormal, acEdit, fOK =
acbUpdateMeter(50)
' C
DoCmd.OpenQuery "Scrub_C", acViewNormal, acEdit, fOK =
acbUpdateMeter(75)
' D
DoCmd.OpenQuery "Scrub_D", acViewNormal, acEdit, fOK =
acbUpdateMeter(100)
' Turn Warnings back ON
DoCmd.SetWarnings True
' Close Status Meter
DoCmd.Close acForm, acbcMeterForm
' Pre-Scrub has completed
Beep
MsgBox "Pre-Scrub has completed", vbOKOnly, "Pre_Scrub Status:"
Pre_Scrub_Exit:
Exit Function
Pre_Scrub_Err:
MsgBox Error$
Resume Pre_Scrub_Exit
End Function
Reusable
Status Meter
http://msdn.microsoft.com/library/d.../en-us/dnacbk02/html/ODC_CookbookChapter9.asp
However I am having a problem with it. My module looks like this:
What am I missing, or what it is I have that I shouldn't have. Rather new
to Macros, and did the upgrade Macro funtion.
Option Compare Database
'------------------------------------------------------------
' Pre_Scrub
'
'------------------------------------------------------------
Function Pre_Scrub()
On Error GoTo Pre_Scrub_Err
' Turn OFF Warnings
DoCmd.SetWarnings False
' Open Status Form
DoCmd.OpenForm "frmStatusMeter", acNormal, "Call
acbInitMeter(""Pre-Scrub Progress"", True) ", "", , acNormal
' A
DoCmd.OpenQuery "Scrub_A", acViewNormal, acEdit, fOK =
acbUpdateMeter(25)
' B
DoCmd.OpenQuery "Scrub_B", acViewNormal, acEdit, fOK =
acbUpdateMeter(50)
' C
DoCmd.OpenQuery "Scrub_C", acViewNormal, acEdit, fOK =
acbUpdateMeter(75)
' D
DoCmd.OpenQuery "Scrub_D", acViewNormal, acEdit, fOK =
acbUpdateMeter(100)
' Turn Warnings back ON
DoCmd.SetWarnings True
' Close Status Meter
DoCmd.Close acForm, acbcMeterForm
' Pre-Scrub has completed
Beep
MsgBox "Pre-Scrub has completed", vbOKOnly, "Pre_Scrub Status:"
Pre_Scrub_Exit:
Exit Function
Pre_Scrub_Err:
MsgBox Error$
Resume Pre_Scrub_Exit
End Function