Solved

startup properties

Posted on 2002-07-30
5
427 Views
Last Modified: 2012-05-04
hi
I want to change my startup properties , I do go to tools then startup and change there for example the icon but it wasn't what I want so I search on the web and find the following code but I don't where to put it .

Dim intX As Integer
Const DB_Text As Long = 10
intX = AddAppProperty("AppTitle", DB_Text, "new title")
intX=AddAppProperty("AppIcon",DB_Text, "C:WindowsCars.bmp")
Application.RefreshTitleBar


0
Comment
Question by:Elyaa
5 Comments
 
LVL 4

Expert Comment

by:zuijdhoek
ID: 7187443
You can create a new function where you can put the code in and call this function StartUp() for instance.
Now create a new macro and select RunCode from the Action-dropdownlist. Enter StartUp in the Function Name textbox. Save the macro as AutoExec. The AutoExec-macro will be executed first when you open the database according your startup-settings. So close and reopen the database to in order to notice any effect.


Hope this might help you out,

Mark
 
0
 

Author Comment

by:Elyaa
ID: 7189671
thank u zuijdhoek
but it give me amessage that it doesn't recognize the function startup ,where i should write this function ?
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7286133

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts refunded
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 
LVL 4

Expert Comment

by:nmilmine
ID: 7290034
Here is some code I use.  Notice the second function calls the first function to make the changes

Function ChangeAppTitle()
   
    Dim intX As Integer
    Const DB_Text As Long = 10
    intX = AddAppProperty("AppTitle", DB_Text, "Nfobase - Version No " _
    & DMax("[Version No]", "Version No"))
    Application.RefreshTitleBar

End Function

Function AddAppProperty(strName As String, varType As Variant, varValue As Variant) As Integer
    Dim dbs As Object, prp As Variant
    Const conPropNotFoundError = 3270

    Set dbs = CurrentDb
    On Error GoTo AddProp_Err
    dbs.Properties(strName) = varValue
    AddAppProperty = True

AddProp_Bye:
    Exit Function

AddProp_Err:
    If Err = conPropNotFoundError Then
        Set prp = dbs.CreateProperty(strName, varType, varValue)
        dbs.Properties.Append prp
        Resume
    Else
        AddAppProperty = False
        Resume AddProp_Bye
    End If
End Function

HTH
Neil
0
 

Accepted Solution

by:
ComTech earned 0 total points
ID: 7314793
This question will be placed in PAQ and points refunded.

Best regards,
ComTech
Community Support
Administrator @ EE
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now