Data Macro Nightmare!!!

jerem

Registered User.
Local time
Today, 22:01
Joined
May 1, 2012
Messages
118
Ok, I have been programming in VBA for quite a while on Excel. I am pretty new to Access. So I decided to take an existing template in Access 2010 (a web template that I converted to a client one), brought the modifications here and there. Added a bit of VBA and, after some learning, modified all the data macro coding to my needs. It took me quite a while but I got the application I wanted. Then I went on to split my database (I can already see experienced users smiling...), and sure enough I hadn't counted on the fact that data macros don't work with linked tables!!!

Now I guess I need to convert all these data macro to VBA... Is that the best and quickest way to resolve the issue? I am looking for some experienced opinions. Thanks a lot!
 
You might want to take a look at this link:
http://www.opengatesw.net/ms-access...Microsoft-Access-2010-Data-Macro-Benefits.htm

In the first paragraph it talks about " (there are ways around this by placing Data Macro logic in the table in it's native database, the logic will fire even when an update is being initiated by a linked database)".

This might be something that would work for you.

I also came across a discussion thread where Albert Kallal talks about the fact that data macros can and will fire in a backend database file. Thought you might want to look at this also.

https://groups.google.com/forum/?fromgroups#!topic/comp.databases.ms-access/a1FBNRTw_K8

Here is yet another article that is very good on the subject.
http://sourcedaddy.com/ms-access/uses-data-macros.html
 
Last edited:
Ok, after a lot of reading: There is a difference between Standard Macros (SM) which are independent and Data Macro (DM) which are bound to tables. When you split a database into FE and BE, these both work independently. This means that a SM cannot call a DM. DM will still work within the BE environment and so will the SM within the FE environment.
The solution to my issue was to replace all the DM called from SM by database formulas (Dlookup, Dsum, Dcount...) and by Action queries.
 

Users who are viewing this thread

Back
Top Bottom