Report Not Printing

G

Guest

Hello all,

In my reports I have replaced the default report header label with an
unbound text box named "txtCustomer". It's purpose is to provide customized
page headers depending on values selected from a form. This works correctly
when viewing within Access, but when I send it to my printer nothing prints.

In the "On Format" section of the report header I have the following
procedure:

Option Compare Database

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
Dim Title As String
Title = "Product Type Listing for "

Me.txtCustomer = Title & Forms![Application Form]!ProductType.Value + "'s"

End Sub
 
G

Guest

Hello again,

I was not specific enough in my first post. Here's whats happening.
Everything prints except the data passed from the form. An example of what is
supposed to print follows:

Product Type Listing for 10 Year Level Terms's

Instead I get:

Product Type Listing for 's

The data being passed in "Forms![Application Form]!ProductType.Value" is not
being printed, but the rest of the header prints fine. Is there a way to get
the criterior being passed from my form to print?

-Sky
 
D

Duane Hookom

Sky,
Do you have code in your report that closes the form?

--
Duane Hookom
MS Access MVP


Sky Warren said:
Hello again,

I was not specific enough in my first post. Here's whats happening.
Everything prints except the data passed from the form. An example of what
is
supposed to print follows:

Product Type Listing for 10 Year Level Terms's

Instead I get:

Product Type Listing for 's

The data being passed in "Forms![Application Form]!ProductType.Value" is
not
being printed, but the rest of the header prints fine. Is there a way to
get
the criterior being passed from my form to print?

-Sky



Sky Warren said:
Hello all,

In my reports I have replaced the default report header label with an
unbound text box named "txtCustomer". It's purpose is to provide
customized
page headers depending on values selected from a form. This works
correctly
when viewing within Access, but when I send it to my printer nothing
prints.

In the "On Format" section of the report header I have the following
procedure:

Option Compare Database

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As
Integer)
Dim Title As String
Title = "Product Type Listing for "

Me.txtCustomer = Title & Forms![Application Form]!ProductType.Value +
"'s"

End Sub
 
G

Guest

No, the form remains open all the time.

Duane Hookom said:
Sky,
Do you have code in your report that closes the form?

--
Duane Hookom
MS Access MVP


Sky Warren said:
Hello again,

I was not specific enough in my first post. Here's whats happening.
Everything prints except the data passed from the form. An example of what
is
supposed to print follows:

Product Type Listing for 10 Year Level Terms's

Instead I get:

Product Type Listing for 's

The data being passed in "Forms![Application Form]!ProductType.Value" is
not
being printed, but the rest of the header prints fine. Is there a way to
get
the criterior being passed from my form to print?

-Sky



Sky Warren said:
Hello all,

In my reports I have replaced the default report header label with an
unbound text box named "txtCustomer". It's purpose is to provide
customized
page headers depending on values selected from a form. This works
correctly
when viewing within Access, but when I send it to my printer nothing
prints.

In the "On Format" section of the report header I have the following
procedure:

Option Compare Database

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As
Integer)
Dim Title As String
Title = "Product Type Listing for "

Me.txtCustomer = Title & Forms![Application Form]!ProductType.Value +
"'s"

End Sub
 
F

fredg

No, the form remains open all the time.

Duane Hookom said:
Sky,
Do you have code in your report that closes the form?

--
Duane Hookom
MS Access MVP

Sky Warren said:
Hello again,

I was not specific enough in my first post. Here's whats happening.
Everything prints except the data passed from the form. An example of what
is
supposed to print follows:

Product Type Listing for 10 Year Level Terms's

Instead I get:

Product Type Listing for 's

The data being passed in "Forms![Application Form]!ProductType.Value" is
not
being printed, but the rest of the header prints fine. Is there a way to
get
the criterior being passed from my form to print?

-Sky



:

Hello all,

In my reports I have replaced the default report header label with an
unbound text box named "txtCustomer". It's purpose is to provide
customized
page headers depending on values selected from a form. This works
correctly
when viewing within Access, but when I send it to my printer nothing
prints.

In the "On Format" section of the report header I have the following
procedure:

Option Compare Database

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As
Integer)
Dim Title As String
Title = "Product Type Listing for "

Me.txtCustomer = Title & Forms![Application Form]!ProductType.Value +
"'s"

End Sub

Well, my guess would have been that the form is being closed. But if
you say it's not, try it this way.

Instead of code in the report Header Format event, use the following
as the control source of that [txtCustomer] control:

= "Product Type Listing for " & Forms![Application form]!ProductType
& "s"

Note: Value is the default property so there is no need to write it.

Does this preview and print OK?
By the way, is this really how you wish this to look?
..... 10 Year Level Terms's
The word Terms is plural, yet you're adding an 's to it.
 
G

Guest

Hi Fredg,

I got rid of the procedure and inserted your code into the Control Source
for txtCustomer. It displays correctly but won't print. As before, everything
prints except the variable being passed from the form.

Can't figure out why the variable data will display but not print.

-Sky

fredg said:
No, the form remains open all the time.

Duane Hookom said:
Sky,
Do you have code in your report that closes the form?

--
Duane Hookom
MS Access MVP

Hello again,

I was not specific enough in my first post. Here's whats happening.
Everything prints except the data passed from the form. An example of what
is
supposed to print follows:

Product Type Listing for 10 Year Level Terms's

Instead I get:

Product Type Listing for 's

The data being passed in "Forms![Application Form]!ProductType.Value" is
not
being printed, but the rest of the header prints fine. Is there a way to
get
the criterior being passed from my form to print?

-Sky



:

Hello all,

In my reports I have replaced the default report header label with an
unbound text box named "txtCustomer". It's purpose is to provide
customized
page headers depending on values selected from a form. This works
correctly
when viewing within Access, but when I send it to my printer nothing
prints.

In the "On Format" section of the report header I have the following
procedure:

Option Compare Database

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As
Integer)
Dim Title As String
Title = "Product Type Listing for "

Me.txtCustomer = Title & Forms![Application Form]!ProductType.Value +
"'s"

End Sub

Well, my guess would have been that the form is being closed. But if
you say it's not, try it this way.

Instead of code in the report Header Format event, use the following
as the control source of that [txtCustomer] control:

= "Product Type Listing for " & Forms![Application form]!ProductType
& "s"

Note: Value is the default property so there is no need to write it.

Does this preview and print OK?
By the way, is this really how you wish this to look?
..... 10 Year Level Terms's
The word Terms is plural, yet you're adding an 's to it.
 
F

fredg

Hi Fredg,

I got rid of the procedure and inserted your code into the Control Source
for txtCustomer. It displays correctly but won't print. As before, everything
prints except the variable being passed from the form.

Can't figure out why the variable data will display but not print.

-Sky

fredg said:
No, the form remains open all the time.

:

Sky,
Do you have code in your report that closes the form?

--
Duane Hookom
MS Access MVP

Hello again,

I was not specific enough in my first post. Here's whats happening.
Everything prints except the data passed from the form. An example of what
is
supposed to print follows:

Product Type Listing for 10 Year Level Terms's

Instead I get:

Product Type Listing for 's

The data being passed in "Forms![Application Form]!ProductType.Value" is
not
being printed, but the rest of the header prints fine. Is there a way to
get
the criterior being passed from my form to print?

-Sky



:

Hello all,

In my reports I have replaced the default report header label with an
unbound text box named "txtCustomer". It's purpose is to provide
customized
page headers depending on values selected from a form. This works
correctly
when viewing within Access, but when I send it to my printer nothing
prints.

In the "On Format" section of the report header I have the following
procedure:

Option Compare Database

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As
Integer)
Dim Title As String
Title = "Product Type Listing for "

Me.txtCustomer = Title & Forms![Application Form]!ProductType.Value +
"'s"

End Sub

Well, my guess would have been that the form is being closed. But if
you say it's not, try it this way.

Instead of code in the report Header Format event, use the following
as the control source of that [txtCustomer] control:

= "Product Type Listing for " & Forms![Application form]!ProductType
& "s"

Note: Value is the default property so there is no need to write it.

Does this preview and print OK?
By the way, is this really how you wish this to look?
..... 10 Year Level Terms's
The word Terms is plural, yet you're adding an 's to it.

Am I correct that the form in question is a form you are using to
enter the parameters in?
What is the code behind the form command button that you click after
you enter the data?
 
G

Guest

Hi fredg,

Here's the code from the form:

Private Sub ProductType_AfterUpdate()
DoCmd.OpenReport "Product Type", acViewPreview
DoCmd.Maximize
RunCommand acCmdFitToWindow
Me.ProductType = Null
End Sub



fredg said:
Hi Fredg,

I got rid of the procedure and inserted your code into the Control Source
for txtCustomer. It displays correctly but won't print. As before, everything
prints except the variable being passed from the form.

Can't figure out why the variable data will display but not print.

-Sky

fredg said:
On Thu, 7 Apr 2005 11:25:04 -0700, Sky Warren wrote:

No, the form remains open all the time.

:

Sky,
Do you have code in your report that closes the form?

--
Duane Hookom
MS Access MVP

Hello again,

I was not specific enough in my first post. Here's whats happening.
Everything prints except the data passed from the form. An example of what
is
supposed to print follows:

Product Type Listing for 10 Year Level Terms's

Instead I get:

Product Type Listing for 's

The data being passed in "Forms![Application Form]!ProductType.Value" is
not
being printed, but the rest of the header prints fine. Is there a way to
get
the criterior being passed from my form to print?

-Sky



:

Hello all,

In my reports I have replaced the default report header label with an
unbound text box named "txtCustomer". It's purpose is to provide
customized
page headers depending on values selected from a form. This works
correctly
when viewing within Access, but when I send it to my printer nothing
prints.

In the "On Format" section of the report header I have the following
procedure:

Option Compare Database

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As
Integer)
Dim Title As String
Title = "Product Type Listing for "

Me.txtCustomer = Title & Forms![Application Form]!ProductType.Value +
"'s"

End Sub



Well, my guess would have been that the form is being closed. But if
you say it's not, try it this way.

Instead of code in the report Header Format event, use the following
as the control source of that [txtCustomer] control:

= "Product Type Listing for " & Forms![Application form]!ProductType
& "s"

Note: Value is the default property so there is no need to write it.

Does this preview and print OK?
By the way, is this really how you wish this to look?
..... 10 Year Level Terms's
The word Terms is plural, yet you're adding an 's to it.

Am I correct that the form in question is a form you are using to
enter the parameters in?
What is the code behind the form command button that you click after
you enter the data?
 
G

Guest

Hi Again,

Fredg, the problem is this line of code " Me.ProductType = Null ". Once I
removed that line everything now prints correctly, including the data being
passed from the form.

Thank you so very much Fredg for pointing me back to the form. Also, your
code helped me eliminate a procedure which makes me very happy :)

-Sky

Sky Warren said:
Hi fredg,

Here's the code from the form:

Private Sub ProductType_AfterUpdate()
DoCmd.OpenReport "Product Type", acViewPreview
DoCmd.Maximize
RunCommand acCmdFitToWindow
Me.ProductType = Null
End Sub



fredg said:
Hi Fredg,

I got rid of the procedure and inserted your code into the Control Source
for txtCustomer. It displays correctly but won't print. As before, everything
prints except the variable being passed from the form.

Can't figure out why the variable data will display but not print.

-Sky

:

On Thu, 7 Apr 2005 11:25:04 -0700, Sky Warren wrote:

No, the form remains open all the time.

:

Sky,
Do you have code in your report that closes the form?

--
Duane Hookom
MS Access MVP

Hello again,

I was not specific enough in my first post. Here's whats happening.
Everything prints except the data passed from the form. An example of what
is
supposed to print follows:

Product Type Listing for 10 Year Level Terms's

Instead I get:

Product Type Listing for 's

The data being passed in "Forms![Application Form]!ProductType.Value" is
not
being printed, but the rest of the header prints fine. Is there a way to
get
the criterior being passed from my form to print?

-Sky



:

Hello all,

In my reports I have replaced the default report header label with an
unbound text box named "txtCustomer". It's purpose is to provide
customized
page headers depending on values selected from a form. This works
correctly
when viewing within Access, but when I send it to my printer nothing
prints.

In the "On Format" section of the report header I have the following
procedure:

Option Compare Database

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As
Integer)
Dim Title As String
Title = "Product Type Listing for "

Me.txtCustomer = Title & Forms![Application Form]!ProductType.Value +
"'s"

End Sub



Well, my guess would have been that the form is being closed. But if
you say it's not, try it this way.

Instead of code in the report Header Format event, use the following
as the control source of that [txtCustomer] control:

= "Product Type Listing for " & Forms![Application form]!ProductType
& "s"

Note: Value is the default property so there is no need to write it.

Does this preview and print OK?
By the way, is this really how you wish this to look?
..... 10 Year Level Terms's
The word Terms is plural, yet you're adding an 's to it.

Am I correct that the form in question is a form you are using to
enter the parameters in?
What is the code behind the form command button that you click after
you enter the data?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top