[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

startup properties

Posted on 2002-07-30
5
Medium Priority
?
478 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

656 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