N
Neil Shorrock
Guest
I have set up a macro to print out an address in a text box on a report using folowing code:
AddressBox1 = ""
If Address1 <> "" Then
AddressBox1 = AddressBox1 & Address1
End If
If Address2 <> "" Then
AddressBox1 = AddressBox1 & (Chr(13) & Chr(10)) & Address2
End If
If Address3 <> "" Then
AddressBox1 = AddressBox1 & (Chr(13) & Chr(10)) & Address3
End If
If Address4 <> "" Then
AddressBox1 = AddressBox1 & (Chr(13) & Chr(10)) & Address4
End If
If Address5 <> "" Then
AddressBox1 = AddressBox1 & (Chr(13) & Chr(10)) & Address5
End If
If PostalCode <> "" Then
AddressBox1 = AddressBox1 & (Chr(13) & Chr(10)) & PostalCode
End If
The address will only print out if I view the document in preview and then print. The print macro openreport and print does not print the address.
Any clues?
I have another report on the same database with the same textbox and code and this works fine.
Cheers
Neil
AddressBox1 = ""
If Address1 <> "" Then
AddressBox1 = AddressBox1 & Address1
End If
If Address2 <> "" Then
AddressBox1 = AddressBox1 & (Chr(13) & Chr(10)) & Address2
End If
If Address3 <> "" Then
AddressBox1 = AddressBox1 & (Chr(13) & Chr(10)) & Address3
End If
If Address4 <> "" Then
AddressBox1 = AddressBox1 & (Chr(13) & Chr(10)) & Address4
End If
If Address5 <> "" Then
AddressBox1 = AddressBox1 & (Chr(13) & Chr(10)) & Address5
End If
If PostalCode <> "" Then
AddressBox1 = AddressBox1 & (Chr(13) & Chr(10)) & PostalCode
End If
The address will only print out if I view the document in preview and then print. The print macro openreport and print does not print the address.
Any clues?
I have another report on the same database with the same textbox and code and this works fine.
Cheers
Neil