By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,761 Members | 1,009 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,761 IT Pros & Developers. It's quick & easy.

Application Icon Location

P: n/a
Is there any way to have the application icon in the same folder as my
database and programmatically tell the database to look for it in that
location?

Thanks in advance.
Nov 12 '05 #1
Share this Question
Share on Google+
6 Replies

P: n/a
Wayne,
Did you mean creating a shortcut ?
If so, then click once on the database then right click to Create Shortcut.
Please let me know if I misunderstood your question.

Omey
"Wayne Aprato" <cq*******@volcanomail.com> wrote in message
news:4d**************************@posting.google.c om...
Is there any way to have the application icon in the same folder as my
database and programmatically tell the database to look for it in that
location?

Thanks in advance.

Nov 12 '05 #2

P: n/a
Set the "AppIcon" property of the database, and RefreshTitleBar:

Dim db As DAO.Database
Dim strFile As String

'Get the path of the database
Set db = dbEngine(0)(0)
strFile = db.Name
strFile = Left$(strPath, Len(strFile) - Len(Dir$(strFile))) & "SomeName.ico"

'Check the icon file exists.
If Len(Dir$(strFile)) > 0 Then
db.Properties("AppIcon") = strFile
Application.RefreshTitleBar
End If

Set db = Nothing

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Wayne Aprato" <cq*******@volcanomail.com> wrote in message
news:4d**************************@posting.google.c om...
Is there any way to have the application icon in the same folder as my
database and programmatically tell the database to look for it in that
location?

Thanks in advance.

Nov 12 '05 #3

P: n/a
Hi Allen. The code:

strFile = Left$(strPath, Len(strFile) - Len(Dir$(strFile))) & "SomeName.ico"

only returned the name of my icon (not the full path) so I changed it to:

strFile = strFile & "\" & "Notepad.ico"

The function now fails at the line:

db.Properties("AppIcon") = strFile

Any help would be appreciated.
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message news:<3f**********************@freenews.iinet.net. au>...
Set the "AppIcon" property of the database, and RefreshTitleBar:

Dim db As DAO.Database
Dim strFile As String

'Get the path of the database
Set db = dbEngine(0)(0)
strFile = db.Name
strFile = Left$(strPath, Len(strFile) - Len(Dir$(strFile))) & "SomeName.ico"

'Check the icon file exists.
If Len(Dir$(strFile)) > 0 Then
db.Properties("AppIcon") = strFile
Application.RefreshTitleBar
End If

Set db = Nothing

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Wayne Aprato" <cq*******@volcanomail.com> wrote in message
news:4d**************************@posting.google.c om...
Is there any way to have the application icon in the same folder as my
database and programmatically tell the database to look for it in that
location?

Thanks in advance.

Nov 12 '05 #4

P: n/a
db.Name

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Wayne Aprato" <cq*******@volcanomail.com> wrote in message
news:4d**************************@posting.google.c om...
Hi Allen. The code:

strFile = Left$(strPath, Len(strFile) - Len(Dir$(strFile))) & "SomeName.ico"
only returned the name of my icon (not the full path) so I changed it to:

strFile = strFile & "\" & "Notepad.ico"

The function now fails at the line:

db.Properties("AppIcon") = strFile

Any help would be appreciated.
"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message

news:<3f**********************@freenews.iinet.net. au>...
Set the "AppIcon" property of the database, and RefreshTitleBar:

Dim db As DAO.Database
Dim strFile As String

'Get the path of the database
Set db = dbEngine(0)(0)
strFile = db.Name
strFile = Left$(strPath, Len(strFile) - Len(Dir$(strFile))) & "SomeName.ico"
'Check the icon file exists.
If Len(Dir$(strFile)) > 0 Then
db.Properties("AppIcon") = strFile
Application.RefreshTitleBar
End If

Set db = Nothing

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Wayne Aprato" <cq*******@volcanomail.com> wrote in message
news:4d**************************@posting.google.c om...
Is there any way to have the application icon in the same folder as my
database and programmatically tell the database to look for it in that
location?

Thanks in advance.

Nov 12 '05 #5

P: n/a
"Wayne Aprato" <cq*******@volcanomail.com> replied in message
news:4d**************************@posting.google.c om...
[snip]

The function now fails at the line:

db.Properties("AppIcon") = strFile


What error? If it's 3270, you have never assigned an icon to this database,
so the property does not exist.

You can simply assign an icon through the interface (Tools | Startup), or if
you need to do it programmatically use CreateProperty().

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
Nov 12 '05 #6

P: n/a
Hi,

On 18 Dec 2003 15:41:31 -0800, Wayne Aprato wrote:
Is there any way to have the application icon in the same folder as my
database and programmatically tell the database to look for it in that
location?


see the "Setting your app's icon"-sample on my website.
Cheers,
Olaf [MVP]
--
My .02: www.Resources.IntuiDev.com
Nov 12 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.