Showing message (1 Viewer)

vsap

vsap
Local time
Today, 04:27
Joined
May 27, 2005
Messages
29
Hello guys,
I have form with a button called process ,when I hit the button it select the column from oracle database tables and then it inserts the values in other oracle database table,so during this process ,I used docmd.hourglass true,but now I want to change to a message stating "Processing..." and after finishing the insertion it hides this message,is anyway to achieve this.
Please let me know asap.

Thanks
vsap
 

KenHigg

Registered User
Local time
Today, 04:27
Joined
Jun 9, 2004
Messages
13,327
Just do a small pop-up form with your custom message that you open and close with code. And make it modal...

???
 

ghudson

Registered User.
Local time
Today, 04:27
Joined
Jun 8, 2002
Messages
6,195
Sometimes Access has a hard time doing two things at once and the form might not be displayed in time or it will show as a grey block on your screen. You can pause the start of your code and give the form a second to load. Search around for the Pause() function I have posted for it will work for this type of instance. The Sleep() API will not do what you want if you need a second to pause the start of your code after the form is called.

I prefer to use custom messages in the applications status bar. Status bar messages will be displayed and updated immediately when called. Here is a sample of how to call it...

Code:
'Place this line at the top of a public module
Public vStatusBar As Variant

Use these commands to show and change the status bar message
Code:
'Display the status bar
Application.SetOption "Show Status Bar", True

'custom status bar message
vStatusBar = SysCmd(acSysCmdSetStatus, "Application is loading... please wait.")

'clear the status bar
vStatusBar = SysCmd(acSysCmdClearStatus)

'hide the status bar
Application.SetOption "Show Status Bar", False
 

vsap

vsap
Local time
Today, 04:27
Joined
May 27, 2005
Messages
29
Thanks!
I tried what u said,I created popup,modal form,I said Openform.msgform and after finishing the process I said Closeform.msgform ,but when I hit button process ,it gives me object error.
As I dont know much access 2000,so can you tell me what I have missed.

Thanks,
vsap
 

vsap

vsap
Local time
Today, 04:27
Joined
May 27, 2005
Messages
29
ghudson said:
Sometimes Access has a hard time doing two things at once and the form might not be displayed in time or it will show as a grey block on your screen. You can pause the start of your code and give the form a second to load. Search around for the Pause() function I have posted for it will work for this type of instance. The Sleep() API will not do what you want if you need a second to pause the start of your code after the form is called.

I prefer to use custom messages in the applications status bar. Status bar messages will be displayed and updated immediately when called. Here is a sample of how to call it...

Code:
'Place this line at the top of a public module
Public vStatusBar As Variant

Use these commands to show and change the status bar message
Code:
'Display the status bar
Application.SetOption "Show Status Bar", True

'custom status bar message
vStatusBar = SysCmd(acSysCmdSetStatus, "Application is loading... please wait.")

'clear the status bar
vStatusBar = SysCmd(acSysCmdClearStatus)

'hide the status bar
Application.SetOption "Show Status Bar", False

Thanks! for reply,I tried the way you said,I said public variant before private module ,then i used your code but somehow it hides the status bar before it being displayed,and if I comment that part (hiding status bar),I can see the status bar with the message,but before that I see all the access messages like verifying the object,running query and my message is just for a short period,and it remains there after my process is finished.
So where should I put this message in loop or out of loop or before all process .
Hope to get answer,and thanks again..

vsap
 

ghudson

Registered User.
Local time
Today, 04:27
Joined
Jun 8, 2002
Messages
6,195
The query status bar will be displayed instead of your custom message but I like that because it gives the user an accurate visual as to what is happening. The order of the commands should be something like this but you can alter it depending on what you want...

Code:
'Display the status bar [if it is hidden]
Application.SetOption "Show Status Bar", True

'custom status bar message
vStatusBar = SysCmd(acSysCmdSetStatus, "Application is loading... please wait.")

'YOUR CODE HERE

'clear the status bar
vStatusBar = SysCmd(acSysCmdClearStatus)

'hide the status bar [if you really want it hidden]
Application.SetOption "Show Status Bar", False
 

Users who are viewing this thread

Top Bottom