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!