Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Very Complicated Label Report

Status
Not open for further replies.

billquga

Technical User
Aug 23, 2001
19
US
Hello All, I am setting up a report that will allow me to print a certain number of labels of our customers. i first have a table called [CUSTOMER ADDRESS]. In this table, i have the fields "Customer Name" "Address Line 2" "Address Line 3" "City" "State" "Zip Code" and "Customer number" (which is an autonumber). In a seperate table called [CUSTOMER ADDRESS TABLE] I have the fields "Customer Name" & "TXTCopies" . In a querey [CUSTOMER ADDRESS TABLE QUEREY] i have the 2 tables, joined by "Customer Name" I select the customer i want in a form [CUSTOMER ADDRESS TABLE]. I then print the report by a macro which opens the [CUSTOMER ADDRESS TABLE] then prints the report, then runs a delete querey to erase the address you just printed (this allows the next user to select a customer from the form without having the customer printed still there). The report has an event procedure that on print shows:

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If [Forms]![Customer Address Table]![txtcopies] = 0 Or IsNull([Forms]![Customer Address Table]![txtcopies]) Then
Me.NextRecord = True
Me.MoveLayout = False
Me.PrintSection = False
Else
If PrintCount < [Forms]![Customer Address Table]![txtcopies] Then
Me.NextRecord = False
End If
End If

End Sub

After all that explaining, my problem is as follows. We have several customers with several different ship to locations. so the Customer Name is the same, but the rest of the address is different. If i select a customer from the list that has multiple locations, the report prints all the locations. If i select a customer with just one locaton, it only prints the number of labels i asked for.

Any help would be greatly appreciated!

Thanks,
Gus
 
Can you create new fields or checkboxes called Shipping 1, Shipping 2, Shipping 3? Incorporate some kind of special ID for those fields?

I'm not exactly sure I get the gist, but it would consider singles to be different or you could add a if not null code to the query to ignore those with blank other mailing addresses.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top