Status Bar

KenHigg

Registered User
Local time
Today, 00:23
Joined
Jun 9, 2004
Messages
13,289
Does anyone know how turn the status bar off with code. I need to turn it off when the main form opens. Then when it closes I need it to come back on...

Thanks,
Ken
 
You could try playing with this....
Code:
Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
    Dim dbs As Object, prp As Variant
    Const conPropNotFoundError = 3270

    Set dbs = CurrentDb
    On Error GoTo Change_Err
    dbs.Properties(strPropName) = varPropValue
    ChangeProperty = True

Change_Bye:
    Exit Function

Change_Err:
    If Err = conPropNotFoundError Then    ' Property not found.
        Set prp = dbs.CreateProperty(strPropName, _
            varPropType, varPropValue)
        dbs.Properties.Append prp
        Resume Next
    Else
        ' Unknown error.
        ChangeProperty = False
        Resume Change_Bye
    End If
End Function

To view...
Code:
    ChangeProperty "StartupShowStatusBar", DB_BOOLEAN, True

and to switch off...
Code:
    ChangeProperty "StartupShowStatusBar", DB_BOOLEAN, False

HTH
 
Last edited:
Wow. Thanks. I'll give it a whirl!

:)
Ken
 
'enable status bar
Code:
Application.SetOption "Show Status Bar", True
'hide status bar
Code:
Application.SetOption "Show Status Bar", False
'Use this if you want to display a custom message in the status bar...
Code:
Dim RetVal As Variant
Application.SetOption "Show Status Bar", True 'only if it is was hidden
RetVal = SysCmd(acSysCmdSetStatus, "Testing... 1, 2, 3")
'This will clear the status bar...
Code:
RetVal = SysCmd(acSysCmdClearStatus)
 
Code:
Application.SetOption "Show Status Bar", False

Perfect - Cool. Thanks

(I was having a time trying to figure out what the other code was doing :o )

:)
Ken
 
I only use the ChangeProperty to create or modify the StartUp options.
 

Users who are viewing this thread

Back
Top Bottom