hiphopanonymous
New member
- Local time
- Today, 15:33
- Joined
- Feb 9, 2008
- Messages
- 1
This is for a packing labelling printer at work. And basically it prints out the destination of where package is to be sent by courier. Problem is if there are more than 1 package i.e. 10 packages it will print out 10 labels of that address and on the label. There is a "...... of ......" printed on the label where we're supposed to write "1 of 10", "2 of 10" etc.. with a pen marker on each label so the courier knows how many packages go together. I'd like to know if there is a way to get MS Access to do it for us, as in print on these dotted lines "1 of 10" "2 of 10" etc... rather than us having to write it with pen marker which can take a while when you have 10+ labels to write on...
The programmer that designed the system for us has left the company and we've no one experienced enough in VB to do it for us. I havent any knowledge in MSA but have done other scripting languages in my IT courses and I've looked around in this access printing program to understand a little bit of what's going on when it prints the label..
There is only 1 macro file and it contained this sub in it which I think may be where I'd need to make some changes or add a few lines of code to get it to number each label..
Public Sub PrintTheLabels2()
Dim CustomerCode As String, numCopies As String, strAddress As String
DoCmd.Close acReport, "LabelPrint"
CustomerCode = InputBox("Enter a Customer Code", "Print Labels, Customer Code")
numCopies = InputBox("Enter the number of copies to print", "Print Labels, Copies")
If CustomerCode = "" Or numCopies = "" Then
Exit Sub
End If
' DoCmd.OpenReport "LabelPrint2", acViewPreview, , "[Customer Code] = '" & CustomerCode & "'"
DoCmd.OpenReport "LabelPrint", acViewPreview, , "Trim([Customer Code]) = '" & CustomerCode & "'"
DoCmd.PrintOut acPrintAll, , , , numCopies
DoCmd.Close
End Sub
Firstly how do I go about editting the report so I can create a textbox where it will place the numbers over the "...... of ......"?
Then how do I get this macro to print the number of copies onto this textbox incrementing the "....." of "10" by 1 in every print of the label?
This is probably not the correct approach just going by instincts on what I see and how I think it will work. If you have a better suggestion or solution to the problem please tell me how..
Thank You!
The programmer that designed the system for us has left the company and we've no one experienced enough in VB to do it for us. I havent any knowledge in MSA but have done other scripting languages in my IT courses and I've looked around in this access printing program to understand a little bit of what's going on when it prints the label..
There is only 1 macro file and it contained this sub in it which I think may be where I'd need to make some changes or add a few lines of code to get it to number each label..
Public Sub PrintTheLabels2()
Dim CustomerCode As String, numCopies As String, strAddress As String
DoCmd.Close acReport, "LabelPrint"
CustomerCode = InputBox("Enter a Customer Code", "Print Labels, Customer Code")
numCopies = InputBox("Enter the number of copies to print", "Print Labels, Copies")
If CustomerCode = "" Or numCopies = "" Then
Exit Sub
End If
' DoCmd.OpenReport "LabelPrint2", acViewPreview, , "[Customer Code] = '" & CustomerCode & "'"
DoCmd.OpenReport "LabelPrint", acViewPreview, , "Trim([Customer Code]) = '" & CustomerCode & "'"
DoCmd.PrintOut acPrintAll, , , , numCopies
DoCmd.Close
End Sub
Firstly how do I go about editting the report so I can create a textbox where it will place the numbers over the "...... of ......"?
Then how do I get this macro to print the number of copies onto this textbox incrementing the "....." of "10" by 1 in every print of the label?
This is probably not the correct approach just going by instincts on what I see and how I think it will work. If you have a better suggestion or solution to the problem please tell me how..
Thank You!