Set Startup Option Programmatically

ssteinke

for what it's worth
Local time
Today, 04:56
Joined
Aug 2, 2003
Messages
195
I've had success using the Application.SetOption property to change certain database options, however, does anyone know how to toggle the checkbox underneath the Application Icon path which reads 'Use as Report and Form Icon' ?

I've searched around and can not find it.

Thanks

~Scott
 
Did you ever find this answer?

I'm trying to set the application icon using VBA.
 
Try SetProperties

You might use the SetProperties function

Code:
[COLOR="Green"]'--------------------------------------------------------------------------------------
' This code is used to change a database property
'--------------------------------------------------------------------------------------[/COLOR]
[COLOR="Navy"]Public Function[/COLOR] SetProperties(strPropName [COLOR="Navy"]As String[/COLOR], _
                            varPropType [COLOR="navy"]As Variant[/COLOR], _
                            varPropValue [COLOR="navy"]As Variant[/COLOR]) [COLOR="navy"]As Integer[/COLOR]

    [COLOR="navy"]On Error GoTo [/COLOR]Err_SetProperties

    [COLOR="navy"]Dim[/COLOR] dbs [COLOR="navy"]As[/COLOR] DAO.Database, prp [COLOR="navy"]As[/COLOR] DAO.Property

    [COLOR="navy"]Set[/COLOR] dbs = CurrentDb
    dbs.Properties(strPropName) = varPropValue
    SetProperties = [COLOR="navy"]True[/COLOR]
    [COLOR="navy"]Set[/COLOR] dbs = [COLOR="navy"]Nothing[/COLOR]

Exit_SetProperties:
    [COLOR="navy"]Exit Function[/COLOR]

Err_SetProperties:
    [COLOR="navy"]If [/COLOR]Err = 3270 [COLOR="navy"]Then [/COLOR][COLOR="DarkGreen"]'Property not found[/COLOR]
        [COLOR="navy"]Set[/COLOR] prp = dbs.CreateProperty(strPropName, varPropType, varPropValue)
        dbs.Properties.Append prp
        [COLOR="navy"]Resume Next[/COLOR]
    [COLOR="navy"]Else[/COLOR]
        SetProperties = [COLOR="navy"]False[/COLOR]
        MsgBox "SetProperties", Err.Number, Err.Description
        [COLOR="navy"]Resume[/COLOR] Exit_SetProperties
    [COLOR="navy"]End If[/COLOR]
[COLOR="Navy"]End Function[/COLOR]

then use this code to change the icon path

Code:
SetProperties "AppIcon", dbText, "path to icon here"
 

Users who are viewing this thread

Back
Top Bottom