Results 1 to 5 of 5
  1. #1
    jerem is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    88

    Data Macro Nightmare!!!

    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!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,972
    I have converted some regular macros to VBA but have never used data macros so can't say how well that will go. Make a copy of your db and try it.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    jerem is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    88
    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.

  4. #4
    jerem is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    88
    It would have been easier to write the whole thing in VBA but as I was modifying an existing database, I didn't want to re-write the whole thing. Plus, now I got to learn DM.

  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Are you ready to use the Thread Tools at the top of the thread and mark this thread as Solved?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Inventory nightmare
    By smeghead67 in forum Database Design
    Replies: 5
    Last Post: 06-13-2012, 07:06 PM
  2. Corruption nightmare
    By Remster in forum Access
    Replies: 4
    Last Post: 03-25-2011, 06:40 AM
  3. help with combo box nightmare
    By Bigthinkor in forum Access
    Replies: 2
    Last Post: 01-13-2011, 10:28 PM
  4. Tabbing nightmare
    By Remster in forum Forms
    Replies: 3
    Last Post: 11-24-2010, 11:35 AM
  5. 1 to many nightmare
    By damian_gareau in forum Access
    Replies: 0
    Last Post: 07-11-2007, 12:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums