Text box will not print (1 Viewer)

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
 

Fornatian

Dim Person
Local time
Today, 20:33
Joined
Sep 1, 2000
Messages
1,396
have you checked that both reports have the code in the same places?
 
N

Neil Shorrock

Guest
The code is in same place and works and prints in preview, but will not print the address from a macro
 

Users who are viewing this thread

Top Bottom