Results 1 to 4 of 4
  1. #1
    nkbyrr is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2014
    Posts
    7

    Reset User Inputted Criteria After Printing a Report

    I've been searching around for the last few days with no success and am completely stumped on what to do.



    I have created a database that tracks customer orders throughout a store, one of the first things that has to happen with a order is to print out a box tag and signature card with customer information. There are two different tags that have to be printed: Box Card and Signature Card. I have it set up so you an either print a batch of cards or a single card. In batch mode the box cards are sorted numerically by order number and signature cards are alphabetical by customer last name.

    I have 4 queries set up for this, one for each of the ways to print. I am using the query to prompt the user to input the order number to print upon clicking a command button. For the batch print it is as follows:
    Code:
    >=[Enter Starting Order Number in WEB0 Format]
    So when the user clicks the button to print, it is set to open and print a report. This report displays and prints the desired records upon the user inputting the order number in the prompt mentioned above.

    What I am running in to is after printing once, the Order Number that the user had entered in sticks, the next time you click print, it automatically assumes that you are printing that order number again. What I want it to do is prompt for a new order number upon clicking print.

    The following is the code for the button click:
    Code:
    Private Sub Command36_Click()On Error GoTo MyError
    DoCmd.OpenReport "Merge Alphabetic", acViewPreview
    DoCmd.RunCommand acCmdPrint
    DoCmd.RunCommand acCmdRemoveAllFilters
    MyExit:
       Exit Sub
    
    
    MyError:
       If Err.Number = 2501 Then GoTo MyExit
       MsgBox Err.Description
       GoTo MyExit
    End Sub
    I thought that: DoCmd.RunCommand acCmdRemoveAllFilters would achieve this but it does nothing.

    Thanks!

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Try adding this:
    Me.Filter = ""
    Me.FilterOn = False
    HTH

  3. #3
    nkbyrr is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2014
    Posts
    7
    Yep! That fixes it> I figured it would be something easy. Thank you so much for the help

  4. #4
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Your Welcome. Good Luck With Your Project!

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

Similar Threads

  1. Replies: 12
    Last Post: 06-12-2014, 07:37 AM
  2. Replies: 7
    Last Post: 12-10-2013, 11:30 PM
  3. Trouble Printing Report on User Machine.
    By Robeen in forum Access
    Replies: 1
    Last Post: 02-27-2012, 02:40 PM
  4. Accessing inputted data
    By kp123 in forum Access
    Replies: 9
    Last Post: 12-07-2011, 10:40 AM
  5. Replies: 5
    Last Post: 09-23-2011, 01:24 PM

Tags for this Thread

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