Solved

startup properties

Posted on 2002-07-30
5
458 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

749 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