RE: Help on macro !
From: BerHav (BerHav_at_discussions.microsoft.com)
Date: 07/02/04
- Next message: GRCC: "Select query, exclude empty fields"
- Previous message: Douglas J. Steele: "Re: Queries using the <> command"
- In reply to: Newbie: "Help on macro !"
- Next in thread: Steve Schapel: "Re: Help on macro !"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 2 Jul 2004 10:46:02 -0700
Hi,
To suppress the system messages insert SetWarnings and in the Option set it to No.
ProgressBar:
MS offers a specific ProgressBar which can be displayed on a form. You will find it under the icon 'more controls' and is named 'Microsoft ProgressBar Control". You can add on a form a normal command button and add some VBA to be executed when clicking the button.
e.g.
Private Sub MyCommand()
Dim i as Integer
Me!ProgressBar1.Min = 0
Me!ProgressBar1.Max = 10000
For i = Me!ProgressBar1.Min to Me!ProgressBar1.Max
Me! ProgressBar1 = i
i = i +1
Next
Me!ProgressBar1.Value = 0
End Sub
I think you will have to amend the above, e.g. remove the for next construct and replace it with the list of things you want to do (run queries, etc.) and increase in between the variable i.
In addition a comment from Doug Steele, MS Access MVP:
While it's true that there's a progress bar capability in Access, in order
to use it, you need to be able to have events that will show progress. When
you use FileCopy, I don't believe any events are exposed that you'd be able
to link to the progress bar.
If I recall correctly, the SHFileOperation API will show the progress
(Sorry: I didn't bother confirming before posting). Randy Birch has an
example of how to use it at http://vbnet.mvps.org/code/shell/shfileopadv.htm
(Obligatory warning about Randy's site: it's aimed at VB programmers, not
Access programmers. Sometimes the form-related instructions will not work in
Access, due to the differences in the Forms model between the two
applications. I did a quick check of this particular sample, though, and I
think it'll port into Access without any problems)
-- HTH Bernd "Newbie" wrote: > Folks, > I have a macro wherein I am running a few queries as a part of the whole > processing. Now what happens is, when these queries are running, for a few > seconds, it all shows up on the screen, and finally the outcome shows. > Now I want the user interface to be clean in the manner that it should all > happen in the background, and the user shouldn't know what is happening. > Though I would like to have a progress bar or a message box saying taht it > is in progress, but not teh processing thing. > > Any ideas on how to suppress this? > TIA. > > >
- Next message: GRCC: "Select query, exclude empty fields"
- Previous message: Douglas J. Steele: "Re: Queries using the <> command"
- In reply to: Newbie: "Help on macro !"
- Next in thread: Steve Schapel: "Re: Help on macro !"
- Messages sorted by: [ date ] [ thread ]