?
Solved

Access DataBase change notification event

Posted on 2005-04-04
5
Medium Priority
?
302 Views
Last Modified: 2008-02-01

Is there a way to fire an OnChange like event every time an Access file is modified and be able to detect it in a visual basic application?
I'm trying to instantly update a VB spreadsheet application every time an external Access database is modified (new records added). I also need to know the contents of the recordsets added.
0
Comment
Question by:arqcom
[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
  • 2
  • 2
5 Comments
 
LVL 66

Expert Comment

by:Jim Horn
ID: 13699638
AFAIK the Application object does not have an .OnChange event, so no.

>a visual basic application?
Access supports VBA.  Why the separate app?

>VB spreadsheet application
Excel?  

0
 
LVL 39

Expert Comment

by:stevbe
ID: 13699687
why not update the spreadsheet from the Access app directly?
0
 

Author Comment

by:arqcom
ID: 13700429
I'm programming a VB POS application. When there's a sale the related info is saved in an Access file.
What I'm trying to do is to monitor the sales from another networked computer, an have a real time information update in a running exe spreadsheet like type application.
0
 
LVL 39

Expert Comment

by:stevbe
ID: 13709640
there is no way I know of with the event model in Access to globally capture any / all changes (like Jim said). You could modify your app to write to a table (same field/record gets overwritten) everytime an update is made and have you monitoring program query that field on a timer event and requery if the lastUpdate is later than the last time your monitor checked it.


Steve
0
 
LVL 66

Accepted Solution

by:
Jim Horn earned 750 total points
ID: 13709940
>monitor the sales from another networked computer, an have a real time information update in a running exe spreadsheet like type application.

Sounds like you need a separate VB app (in addition to the POS one) that connects to the Access database, and has a timer that fires every minute (or time period of your choosing) to provide you realtime summary data.  I think it's best to code this logic in your VB, and just let Access be the data repository.

Hope this helps.
-Jim
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…
Suggested Courses

752 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