I want to show a Progress bar to user, while I delete and Insert into a table. I use this block of code but I can't see the progressbar in the form. Would you please help me to solve this problem?
SysCmd acSysCmdInitMeter, "Updating: ", 1000
For Counter = 1 To 1000
SysCmd acSysCmdUpdateMeter, Counter
On Error GoTo PROC_ERR
Set db = CurrentDb
ssql = "DELETE FROM Test_Table"
db.Execute ssql, dbFailOnError
ssql = "INSERT INTO Test_Table SELECT DISTINCT tb_KonzeptDaten.DFCC, " _
& "tb_KonzeptDaten.OBD_Code AS Konzept_Obd,tb_KonzeptDaten.DFC " _
& "FROM tb_KonzeptDaten"
db.Execute ssql, dbFailOnError
Msgbox "Die Tabelle wurde erfolgreich aktualisiert"
ExitSub:
'Clean Up Code
Exit Sub
PROC_ERR:
Msgbox Err.Description
GoTo ExitSub:
Next Counter
SysCmd acSysCmdRemoveMeter
thank you
EDIT: I think, that I should make my question simpler. I want to show progressbar in statusbar hence I've wirte this block of code for test:
Private Sub Befehl80_Click()
Dim Progress_Amount As Integer, RetVal As Variant
RetVal = SysCmd(acSysCmdInitMeter, "Reading Data...", 2000)
For Progress_Amount = 1 To 2000
RetVal = SysCmd(acSysCmdUpdateMeter, Progress_Amount)
Next Progress_Amount
End Sub
I have this expectation, if the I click this button I'm able to see the statusbar, but unfortunatly I can't see it when I click this button, but if I close this access project then this statusbar appear. Have you any idee to solve this problem?