If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
InputBox
Hi Group,
Access 2000 win xppro I have a command button on my form to print labels. I would like to have an input box to enter the quantity of labels to print. The code below is as far as I've gotten. It doesn't work. I should say the inputBox part works. I can't figure out how to get the quantity entered to give me that many copies. Private Sub cmdPrintLabel_Click() On Error GoTo Err_cmdPrintLabel_Click Dim stDocName As String stDocName = "rpt4UpLabel" InputBox "Enter quantity to print", "Label Quantity" DoCmd.OpenReport stDocName, acViewPreview Exit_cmdPrintLabel_Click: Exit Sub Err_cmdPrintLabel_Click: MsgBox Err.Description Resume Exit_cmdPrintLabel_Click End Sub As always any thoughts, comments or suggestions are welcome. regards Mike |
#2
|
|||
|
|||
InputBox
Take a look at
http://groups.google.ca/group/micros...01f8d38e7ebda4 and http://groups.google.ca/group/comp.d...a000bae71295a2 It should be what you're looking for. -- Hope this helps, Daniel Pineault If this post was helpful, please rate it by using the vote buttons. "Mike Revis" wrote: Hi Group, Access 2000 win xppro I have a command button on my form to print labels. I would like to have an input box to enter the quantity of labels to print. The code below is as far as I've gotten. It doesn't work. I should say the inputBox part works. I can't figure out how to get the quantity entered to give me that many copies. Private Sub cmdPrintLabel_Click() On Error GoTo Err_cmdPrintLabel_Click Dim stDocName As String stDocName = "rpt4UpLabel" InputBox "Enter quantity to print", "Label Quantity" DoCmd.OpenReport stDocName, acViewPreview Exit_cmdPrintLabel_Click: Exit Sub Err_cmdPrintLabel_Click: MsgBox Err.Description Resume Exit_cmdPrintLabel_Click End Sub As always any thoughts, comments or suggestions are welcome. regards Mike |
#3
|
|||
|
|||
InputBox
Private Sub cmdPrintLabel_Click()
On Error GoTo Err_cmdPrintLabel_Click Dim stDocName As String stDocName = "rpt4UpLabel" Copies = Val(InputBox("Enter quantity to print", "Label Quantity")) If Copies 0 Then For i = 1 To Copies DoCmd.OpenReport stDocName, acViewNormal Next i End If Exit_cmdPrintLabel_Click: Exit Sub Err_cmdPrintLabel_Click: MsgBox Err.Description Resume Exit_cmdPrintLabel_Click End Sub -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200801/1 |
#4
|
|||
|
|||
InputBox
Thank you!
"Daniel Pineault" wrote in message ... Take a look at http://groups.google.ca/group/micros...01f8d38e7ebda4 and http://groups.google.ca/group/comp.d...a000bae71295a2 It should be what you're looking for. -- Hope this helps, Daniel Pineault If this post was helpful, please rate it by using the vote buttons. "Mike Revis" wrote: Hi Group, Access 2000 win xppro I have a command button on my form to print labels. I would like to have an input box to enter the quantity of labels to print. The code below is as far as I've gotten. It doesn't work. I should say the inputBox part works. I can't figure out how to get the quantity entered to give me that many copies. Private Sub cmdPrintLabel_Click() On Error GoTo Err_cmdPrintLabel_Click Dim stDocName As String stDocName = "rpt4UpLabel" InputBox "Enter quantity to print", "Label Quantity" DoCmd.OpenReport stDocName, acViewPreview Exit_cmdPrintLabel_Click: Exit Sub Err_cmdPrintLabel_Click: MsgBox Err.Description Resume Exit_cmdPrintLabel_Click End Sub As always any thoughts, comments or suggestions are welcome. regards Mike |
#5
|
|||
|
|||
InputBox
Thank you!
"Linq Adams via AccessMonster.com" u28780@uwe wrote in message news:7edce33d58485@uwe... Private Sub cmdPrintLabel_Click() On Error GoTo Err_cmdPrintLabel_Click Dim stDocName As String stDocName = "rpt4UpLabel" Copies = Val(InputBox("Enter quantity to print", "Label Quantity")) If Copies 0 Then For i = 1 To Copies DoCmd.OpenReport stDocName, acViewNormal Next i End If Exit_cmdPrintLabel_Click: Exit Sub Err_cmdPrintLabel_Click: MsgBox Err.Description Resume Exit_cmdPrintLabel_Click End Sub -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200801/1 |
Thread Tools | |
Display Modes | |
|
|