Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

startup properties

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
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.
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.

828 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