Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Access DataBase change notification event

Posted on 2005-04-04
5
Medium Priority
?
310 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
  • 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

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Question has a verified solution.

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

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

580 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