Results 1 to 8 of 8
  1. #1
    Modify_inc is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    100

    My first attempt using a macro and it's not working

    I'm following this guide at MSDN, Office 2010 Developer Training Course > Access 2010 > Building Solutions with Access 2010 Lab using the Contacts Web Database template.



    I'm at Exercise 4: Creating a Data Macro and for whatever reason my macro is not working at all.

    I created the macro and confirmed it matched to the guide and I had no errors when I saved it, so that has to count for something.

    The macro is suppose to be invoked when the 'Status' variable is "Offer Outstanding" more than once in the database.

    Yet I can select it multiple times without any instances of the macro displaying any warning message as it should.

    Should mention, the "Offer Outstanding" is from a drop down list, so it's not that I'm mistyping it multiple times.

    The guide mentions to test the macro twice, one against the table and once against the form. It doesn't work for either and unfortunately the guide assumes they work, and doesn't suggest anything if it doesn't.

    I even tried enabling all macros (dangerous), and restarting Access with no success. I'm still learning Access and this is my first attempt at defining a macro.

    This is the macro, sorry didn't know how to copy just the code from Access so I took a snapshot.

    Click image for larger version. 

Name:	Macro Not Working.jpg 
Views:	23 
Size:	85.3 KB 
ID:	8769

    Thanks
    Mike
    Last edited by Modify_inc; 08-10-2012 at 11:42 AM.

  2. #2
    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
    Have you set your Trusted Location yet? http://www.btabdevelopment.com/ts/2010TL

  3. #3
    Modify_inc is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    100
    Quote Originally Posted by RuralGuy View Post
    Have you set your Trusted Location yet? http://www.btabdevelopment.com/ts/2010TL
    Thanks, but that didn't make any difference.

    Is there a simple macro I can try just to test if my macros are working correctly? Then again I assume that would be challenging since it would depend on my Objects.

    I'm using the Contacts Web Database that is provided with Access 2010 if that helps. Of course I'm making small manipulations with regards to the guide.

  4. #4
    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
    Just display a MsgBox.

  5. #5
    Modify_inc is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    100
    Quote Originally Posted by RuralGuy View Post
    Just display a MsgBox.
    I don't want to waste anybody's time here, but can you tell me how exactly to do that?

    Remember this tutorial I'm following is the first time I have used a macro.

    This is what I have so far trying on my own based on the limited knowledge I have currently of macros:

    If [Status] = "Open" Then

    I'm not sure what to put in the next box, since I didn't see MsgBox as a choice and none of the options look like they apply.

    I'm also curious, if this "IF" statement is already true when I open the database would it still work or do I need to make sure "Status" is set to another choice other than "Open"?

  6. #6
    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
    Hmm...I'm not going to be much help here since I've never created an Access Macro in my life; I always use code, sorry. I'll see if I can find you some help.

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,820
    Maybe this will help http://office.microsoft.com/en-us/ac...001226255.aspx

    Is your goal to have a web database?

    I never built a web database and don't use macros, only VBA, unless no other choice. Twice I had to resort to macro for something VBA couldn't do.
    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.

  8. #8
    Modify_inc is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    100
    Quote Originally Posted by June7 View Post
    Maybe this will help http://office.microsoft.com/en-us/ac...001226255.aspx

    Is your goal to have a web database?

    I never built a web database and don't use macros, only VBA, unless no other choice. Twice I had to resort to macro for something VBA couldn't do.
    Looks promising, thanks for the link!

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

Similar Threads

  1. Failed attempt at concetenation
    By snowboarder234 in forum Queries
    Replies: 2
    Last Post: 07-12-2012, 09:02 AM
  2. macro not working in Windows 7 machine
    By vemi007 in forum Programming
    Replies: 2
    Last Post: 04-19-2012, 01:45 AM
  3. Macro stops working for 'USER' group
    By EliOklesh in forum Security
    Replies: 1
    Last Post: 10-28-2011, 07:54 PM
  4. Macro Filter not working....
    By avarusbrightfyre in forum Access
    Replies: 2
    Last Post: 06-18-2011, 04:09 PM
  5. RunCode in macro not working
    By LilMissAttack in forum Access
    Replies: 0
    Last Post: 05-27-2010, 05:01 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