A family of Microsoft relational database management systems designed for ease of use.
You could create a function that sets the icon to Calendar.ico, and call that function from the m_openquery.Calendar macro, using the RunCode action.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
How can I programmatically change the msaccess property of the startup application icon for my msaccess database?
I would like my users to see a different application icon on their taskbar, depending on which startup macro launches the database. I have created different .lnk icons to launch different copies of the same database front end, but these .lnk icons switch to the access application icon after they start up.
FOR EXAMPLE:
.LNK TARGET COMMAND: abc.mdb /x m_openquery.Calendar:
Startup icon that is pinned to the taskbar: Calendar.ico
Application icon: abc.ico
Programmatically change application icon to Calendar.ico to match taskbar icon
.LNK TARGET COMMAND: abc.mdb /x m_openquery.ActivityMemos
Startup icon that is pinned to the taskbar: Memo.ico
Application icon: abc.ico
Programmatically change application icon to Memo.ico to match taskbar icon
A family of Microsoft relational database management systems designed for ease of use.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
You could create a function that sets the icon to Calendar.ico, and call that function from the m_openquery.Calendar macro, using the RunCode action.
Thank you!
The last step is: How do I get that code to execute ONLY IF database launches with the /x OpenQuery.Calendar macro?
To create or set a property, you only need to copy the part from
Function AddAppProperty(strName As String, varType As Variant, _
varValue As Variant) As Integer
up to and including the line
End Function
below it into a code module in your database.
Thank you very much, Hans. I can't wait to try it after class. Since I am a dope, how much of the surrounding code in the link's example will I need to include?
See http://www.granite.ab.ca/access/settingstartupoptions.htm for the code needed to set and read database properties.
The application icon is the AppIcon property. To set it, you can use code like this:
AddAppProperty "AppIcon", dbText, "C:\MyFolder\Calendar.ico"