G
Guest
I have a form with [Salons] table, and a subform with [Salon_addresses]
table. I would like to add a command button: "Print Mailing Label" which
would print a label with the data from the current Salon in the form view. I
have ship to, main, home, mailing addresses for some clients. A query was
set up with PK [Advantage_Number] from Salons Table, and Address fields from
Addresses Table. Yes, the address table has a foreign key Advantage_Number.
Then I ran a label wizard in Reports and used the fields from the query.
This is what I have patched up so far from other's advice on this site:
Private Sub PrintSalonLabel_Click()
On Error GoTo Err_PrintSalonLabel_Click
Dim stDocName As String
stDocName = "Label_Salon"
DoCmd.OpenReport "Label_Salon", acViewPreview, , "[Advantage_Number]=" &
Me![Advantage_Number]
Exit_PrintSalonLabel_Click:
Exit Sub
Err_PrintSalonLabel_Click:
MsgBox Err.Description
Resume Exit_PrintSalonLabel_Click
When I click on the command button, it says the data may not fit the page,
when I waive the warning, another error comes up saying the Data types do not
match. The only data issues I can think of is PK's, and the rest is text.
Thank You for your help!
table. I would like to add a command button: "Print Mailing Label" which
would print a label with the data from the current Salon in the form view. I
have ship to, main, home, mailing addresses for some clients. A query was
set up with PK [Advantage_Number] from Salons Table, and Address fields from
Addresses Table. Yes, the address table has a foreign key Advantage_Number.
Then I ran a label wizard in Reports and used the fields from the query.
This is what I have patched up so far from other's advice on this site:
Private Sub PrintSalonLabel_Click()
On Error GoTo Err_PrintSalonLabel_Click
Dim stDocName As String
stDocName = "Label_Salon"
DoCmd.OpenReport "Label_Salon", acViewPreview, , "[Advantage_Number]=" &
Me![Advantage_Number]
Exit_PrintSalonLabel_Click:
Exit Sub
Err_PrintSalonLabel_Click:
MsgBox Err.Description
Resume Exit_PrintSalonLabel_Click
When I click on the command button, it says the data may not fit the page,
when I waive the warning, another error comes up saying the Data types do not
match. The only data issues I can think of is PK's, and the rest is text.
Thank You for your help!