By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,558 Members | 1,373 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,558 IT Pros & Developers. It's quick & easy.

How to write text on Status bar

P: 5
How can I display text like welcome on status bar? in Microsoft Access


Simple code or explanation please
Sep 7 '08 #1
Share this Question
Share on Google+
11 Replies


ADezii
Expert 5K+
P: 8,627
  1. To Write Text on the Status Bar:
    Expand|Select|Wrap|Line Numbers
    1. Dim varReturn As Variant
    2.  
    3. varReturn = SysCmd(acSysCmdSetStatus, "Text to write on the Status Bar!")
  2. To Clear Text from the Status Bar:
    Expand|Select|Wrap|Line Numbers
    1. Dim varReturn As Variant
    2.  
    3. varReturn = SysCmd(acSysCmdSetStatus, " ")
Sep 7 '08 #2

NeoPa
Expert Mod 15k+
P: 31,441
Expand|Select|Wrap|Line Numbers
  1. Application.Echo EchoOn:=False, bstrStatusBarText:="Your Message Here"
Or, more simply :
Expand|Select|Wrap|Line Numbers
  1. Application.Echo False, "Your Message Here"
Sep 7 '08 #3

P: 5
  1. To Write Text on the Status Bar:
    Expand|Select|Wrap|Line Numbers
    1. Dim varReturn As Variant
    2.  
    3. varReturn = SysCmd(acSysCmdSetStatus, "Text to write on the Status Bar!")
  2. To Clear Text from the Status Bar:
    Expand|Select|Wrap|Line Numbers
    1. Dim varReturn As Variant
    2.  
    3. varReturn = SysCmd(acSysCmdSetStatus, " ")

Thanks a lot . It works perfectly. Just what I was looking for. Thanks and may God bless you.
Sep 8 '08 #4

P: 5
Expand|Select|Wrap|Line Numbers
  1. Application.Echo EchoOn:=False, bstrStatusBarText:="Your Message Here"
Or, more simply :
Expand|Select|Wrap|Line Numbers
  1. Application.Echo False, "Your Message Here"

Thanks a lot. Unfortunately, it just doesn't work.

Thanks a lot.
Sep 8 '08 #5

ADezii
Expert 5K+
P: 8,627
Thanks a lot . It works perfectly. Just what I was looking for. Thanks and may God bless you.
Same to you, davidogutu.
Sep 8 '08 #6

NeoPa
Expert Mod 15k+
P: 31,441
Thanks a lot. Unfortunately, it just doesn't work.

Thanks a lot.
Sorry about that.

I tested it yesterday and it showed up. Unfortunately, today my status bar has disappeared completely (probably related somehow to the testing I would guess) and won't return even when I tell it to using Tools / Options.

I suppose I will need to understand this better somehow.
Sep 8 '08 #7

missinglinq
Expert 2.5K+
P: 3,532
Ade, you might try just setting Echo back to True. The few times I've tried using it it did some strange things, and I believe you have to explicitly turn it back on.I seem to remember that even closing then re-opening Access won't reset it.

Linq ;0)>.
Sep 8 '08 #8

ADezii
Expert 5K+
P: 8,627
Sorry about that.

I tested it yesterday and it showed up. Unfortunately, today my status bar has disappeared completely (probably related somehow to the testing I would guess) and won't return even when I tell it to using Tools / Options.

I suppose I will need to understand this better somehow.
Hello NeoPa, I just think that you are simply not using Echo in the proper context. Its primary Function is not to display Text on the Status Bar:
Expand|Select|Wrap|Line Numbers
  1. Dim lngCounter As Long
  2.  
  3. DoCmd.Hourglass True
  4. Application.Echo False, "VB Code Now Executing...."
  5.  
  6. 'Simulate something the User should not see, do not Repaint the Screen
  7. For lngCounter = 1 To 20000
  8.   Debug.Print lngCounter / 0.357
  9. Next
  10.  
  11. DoCmd.Hourglass False
  12. Application.Echo True     'Allow the Screen to be Repainted again
  13.  
Sep 9 '08 #9

ADezii
Expert 5K+
P: 8,627
Ade, you might try just setting Echo back to True. The few times I've tried using it it did some strange things, and I believe you have to explicitly turn it back on.I seem to remember that even closing then re-opening Access won't reset it.

Linq ;0)>.
Hello Linq, good point to make. If you turn echo OFF in Visual Basic, you must turn it back ON or it will remain OFFf, even if the user presses CTRL+BREAK or if Visual Basic encounters a Breakpoint.
Sep 9 '08 #10

NeoPa
Expert Mod 15k+
P: 31,441
I should have mentioned I also ran :
Expand|Select|Wrap|Line Numbers
  1. Application.Echo True
Although, as this only really turns on the updating of it (rather than the existence of it) I was rather pinning my hopes on setting the Status bar back to being shown on the screen.

I'll check again when I get home. Hopefully after a reboot and a restart of Access it may be fixed now (crosses fingers).
Sep 9 '08 #11

P: 1
This worked for me:

Create this function, then use it within a subroutine; e.g., A_StatusBar("Write this in the status bar"). Or, in a macro use RunCode and use the same syntax. To clear the status bar, use A_StatusBar(" ") with a space.

Function A_StatusBar(tString As String)
Dim varReturn As Variant

varReturn = SysCmd(acSysCmdSetStatus, tString)

End Function
Sep 12 '16 #12

Post your reply

Sign in to post your reply or Sign up for a free account.