VBA Code For Windows Popup Message (1 Viewer)

abbaddon223

Registered User.
Local time
Today, 01:45
Joined
Mar 13, 2010
Messages
162
Hi,

Thank you in advance for any kind assistance with the below.

I've enclosed just my question below, and also an expanded explanation of what this fits into for context if needed.

Question

I'm looking for a VBA solution which I can store in an Access form. The code will launch a popup notification box which will appear irrespective of whether I am currently viewing the Access application or not.

Ideally I'd like this to be acheived without needing to switch focus to Access from another application back to Access, so I think this may need to call a Windows prompt. If variables can be parsed from Access to this "Windows" message, all the better, but not essential.

The best I can think of presently is to parse what is needed into a .bat file with an echo command, then have VBA execute that batch file. Perhaps there is a better way....

Explanation of Project for Context

The overall objective here is that I link MS Access to my Outlook folder reading my inbox, renamed as "Tb_Inbox"

I have a list of subjected headings in a table which I add to as needed, "Tb_Priority_Subjects", and another "Tb_Msg_Notifications"

An on_timer event is running in the background searching "Tb_Inbox" for matching strings in "Tb_Priority_Subjects" WHERE the URN (as string made from the received date/time and subject heading) is unmatched, IE a new priority message

This appends the required information from "Tb_Inbox" into "Tb_Msg_Notifications" with the "Tb_Msg_Notifications.Notified" set as "No"

The same form which executes the append query also opens the "Tb_Msg_Notifications" table with a parameter of displaying records where tb_Msg_Notifications.Notified = No on a single record view

At that stage, I'd like to add the required code into that event to popup a screen message, no matter what screen or application I am, on letting me know there is a new message. In an ideal world, perhaps pulling some variables from the table the form is reading from.

The form will then update the .notified field to "Yes"

Again thank you for any kind assistance.
 

Ranman256

Well-known member
Local time
Today, 04:45
Joined
Apr 9, 2015
Messages
4,337
it seems to me the vb code would be in outlook, scanning the folder,
then if needed post updates to the database via ADO.
 

Users who are viewing this thread

Top Bottom