Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 'Progress Text Box' 1

Status
Not open for further replies.

PWD

Technical User
Jul 12, 2002
823
GB
Good afternoon. I'm trying to create some sort of "Progress Text Box" to inform me what's going on behind a command button. Basically there about 35 various Delete / Append / Update queries that run off this button & I'd just like to be able to see what's processing. I already have (thanks whoever it was) a progress bar, so I've just put a Text Box over the top. I was busy rewriting the code as follows:-
Code:
        'Show Progress Bar
        With Form_FS_output
        .boxProgressBar.Visible = True
        .rectProgressBar.Visible = True
        .Progress_Text_Box.Visible = True
        .Progress_Text_Box.Value = "Delete_All_Appended"
        End With

CurrentDb.Execute "Delete_All_Appended"

        Form_FS_output.Progress_Text_Box.Value = "Delete_EMEA"

CurrentDb.Execute "Delete_EMEA"

        Form_FS_output.Progress_Text_Box.Value = "Delete_ASIA"

CurrentDb.Execute "Delete_ASIA"

        Form_FS_output.Progress_Text_Box.Value = "Delete_AMERICAS"
        
CurrentDb.Execute "Delete_AMERICAS"

        'Hide Progress Bar
        With Form_FS_output
        .boxProgressBar.Visible = False
        .rectProgressBar.Visible = False
        .Progress_Text_Box.Value = ""
        .Progress_Text_Box.Visible = False
        End With

But I wonder if there's a better way of going about this?

I had thought to make it easier to add this to the code if I changed it along the lines of:-
Code:
ThisValue = "Delete_All_Appended"

        'Show Progress Bar
        With Form_FS_output
        .boxProgressBar.Visible = True
        .rectProgressBar.Visible = True
        .Progress_Text_Box.Visible = True
        .Progress_Text_Box.Value = ThisValue
        End With
        
CurrentDb.Execute ThisValue


ThisValue = "Delete_EMEA"

        Form_FS_output.Progress_Text_Box.Value = ThisValue
        
CurrentDb.Execute ThisValue


ThisValue = "Delete_ASIA"

        Form_FS_output.Progress_Text_Box.Value = ThisValue
        
CurrentDb.Execute ThisValue

There isn't anything such as "Active Process" or something generic that could be used instead? Or how about some other completely & utterly, totally brilliant idea?

Any thoughts?

Many thanks,
D€$
 
If query names are the same as messages, you can consider using array and For Each...Next:
Code:
qNames=Array("Delete_All_Appended","Delete_EMEA","Delete_ASIA")
For Each qName in qNames
    Form_FS_output.Progress_Text_Box.Value = qName
    CurrentDb.Execute qName
Next qName

combo
 
Yes, I was just thinking along the lines of "Keep It Simple" just so it gives me something to look at while it does its stuff.

I'll give it a go. Thanx.

Many thanks,
D€$
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top