?
Solved

startup properties

Posted on 2002-07-30
5
Medium Priority
?
471 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
[X]
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
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

764 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