Results 1 to 6 of 6
  1. #1
    Paintballlovr is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jul 2013
    Posts
    96

    message box after if/end if not displaying


    Is there an issue with displaying a message box after if/end if statement in 2010 macro or do I have something in the wrong place? I think I have attached a picture of the macro order.
    Attached Thumbnails Attached Thumbnails Import Macro.jpg  

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,574
    Depends what happens within the If Then code. Is there maybe an Exit Macro? I don't use macros so not sure that is possible. Exiting a procedure before all code runs is possible in VBA.

    Programmatically changing db design is usually a bad idea. Why are you importing data to new tables and not existing tables?
    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
    Paintballlovr is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jul 2013
    Posts
    96
    Quote Originally Posted by June7 View Post
    Depends what happens within the If Then code. Is there maybe an Exit Macro? I don't use macros so not sure that is possible. Exiting a procedure before all code runs is possible in VBA.

    Programmatically changing db design is usually a bad idea. Why are you importing data to new tables and not existing tables?
    The IF command sends an email to a distribution list, if a query has any results. My intent was for the message box to run independent of the if statements, but that's not the case. Today was the first day that the message box appeared and it corresponded to it being the first day there were results to email. I assumed that the message box being listed after the end if would keep them apart, but that's not happening. Do I need another command between them so the message box fires regardless of the outcome of the IF commands?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,574
    Since I don't use macros, not sure. I would think the MsgBox should run regardless, it would in VBA.
    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.

  5. #5
    Paintballlovr is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jul 2013
    Posts
    96
    Bump. I'll entertain any ideas at this point.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,574
    Syntax for the MsgBox arguments looks odd to me but I don't use macros and I have 2010. Maybe drop the last comma, but I would expect that extraneous comma to trigger error.

    Could post db for analsyis. Follow instructions at bottom of my post.

    Or convert macros to VBA and post VBA code for analysis.
    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.

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

Similar Threads

  1. Replies: 2
    Last Post: 01-23-2014, 12:40 PM
  2. Replies: 15
    Last Post: 11-01-2013, 03:24 PM
  3. Replies: 9
    Last Post: 09-26-2012, 12:20 PM
  4. Not Displaying a : or ,
    By hawkins in forum Forms
    Replies: 9
    Last Post: 08-12-2011, 11:39 AM
  5. Displaying Value and not ID
    By jonny in forum Access
    Replies: 3
    Last Post: 10-19-2009, 08:21 AM

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