Results 1 to 3 of 3
  1. #1
    afa is offline Novice
    Windows 8 Access 2013
    Join Date
    Feb 2016
    Posts
    22

    Question Repeat Prompt Count

    As an example:


    I have an Access database with the following VBA code:
    DoCmd.RunMacro "Print Sales", 2

    How do I prompt the repeat part of the code so the user enters 2 or 3, then the macro runs that many times. ??

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    vNum = inputbox("Enter repeat count","Repeat")
    DoCmd.RunMacro "Print Sales", vNum

  3. #3
    afa is offline Novice
    Windows 8 Access 2013
    Join Date
    Feb 2016
    Posts
    22
    You're amazing!!! Thank you!!

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

Similar Threads

  1. Do not repeat
    By tanyapeila in forum Reports
    Replies: 7
    Last Post: 04-10-2014, 12:55 PM
  2. Replies: 30
    Last Post: 08-15-2012, 02:25 PM
  3. How to repeat data?
    By djclntn in forum Forms
    Replies: 4
    Last Post: 06-29-2012, 05:08 PM
  4. Do not repeat pictures
    By gabrielharo in forum Forms
    Replies: 1
    Last Post: 06-12-2012, 04:58 PM
  5. Repeat Expressions
    By welshmpf in forum Access
    Replies: 8
    Last Post: 09-06-2011, 09:41 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