Solved

Access 2013: API code to put hidden database icon in taskbar?

Posted on 2016-09-01
8
57 Views
Last Modified: 2016-09-04
I have Access 2013 databases with hidden database windows and popup, modal forms and it works, but there is no icon in the taskbar for users to switch between applications.
I found this : http://stackoverflow.com/questions/26594043/access-application-hidden-application-window-with-form-taskbar-icon

I can't get it to work. Is it necessary to include a reference in order to use API functions?
Thanks In Advance.
0
Comment
Question by:machine_run
8 Comments
 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
<<I can't get it to work. Is it necessary to include a reference in order to use API functions?>>

No, no references.  Your code should compile fine.

Would you consider putting it in the system tray by the date and time?

Jim.
0
 
LVL 1

Author Comment

by:machine_run
Comment Utility
When debugging :

WStyle = GetWindowLong(frmHwnd, GWL_EXSTYLE)  
Error = GWL_EXSTYLE variable not defined.

WStyle = WStyle Or WS_EX_APPWINDOW
Error = WS_EX_APPWINDOW variable not defined.

Others also.
0
 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
<<WS_EX_APPWINDOW>>

 You missed copying something then or they did not post the full solution.

 Those are constants  or type structures that are required.  I would dig them out for you, but I'm very short on time at the moment and you should be able to find them on-line easily enough with a quick google search on either the constant or the API call.

Jim.
0
 
LVL 18
Comment Utility
>"I have Access 2013 databases with hidden database windows and popup, modal forms and it works, but there is no icon in the taskbar for users to switch between applications."

are you are opening a second database from VBA? if so, what code are you using?
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 1

Author Comment

by:machine_run
Comment Utility
crystal, no, just opening one.
0
 
LVL 31

Accepted Solution

by:
Helen_Feddema earned 500 total points
Comment Utility
If you just want to have a taskbar icon to open this database, try the technique in this Access Archon article (Making an Access Database Taskbar Item).  The steps are listed below (shorn of screen shots); the full instructions are in the attached article.  (No API calls needed!)

1.      Create a folder for the new toolbar – I made one called Taskbar Items under the default folder for my user name.
2.      Right-drag the database to the new folder, and select Create Shortcut Here from the context menu when dropping it.
3.      Edit the shortcut name as desired.
4.      Right-click the taskbar and select New toolbar…
5.      Select the Taskbar Items toolbar:
6.      The new toolbar appears on the right side of the taskbar, with the toolbar name displayed:
7.      Unlock the Taskbar if it is locked:
8.      Right-click the toolbar name and uncheck the Show Text and Show Title items:
9.      Now you will see a small Access icon representing the database, that you can click to open the database, just as in Windows XP:
Access-Archon-Column-237----Making-a.doc
0
 
LVL 1

Author Comment

by:machine_run
Comment Utility
Helen_Feddema,

This solution is GLORIOUS!
I have each database in the taskbar (separate folders) with custom icons and NO API spaghetti!

THANK YOU THANK YOU
0
 
LVL 1

Author Closing Comment

by:machine_run
Comment Utility
EXCELLENT!!!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
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…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now