Can shrink can grow..

G

Guest

Hi all...

I have set the can shrink can grow to a text box to "Yes". When I view
the report the box does not grow or shrink, it stays the same. I then read
that it is for when you print only. I printed the report and it did not grow
or shrink it stayed the same as it looked on the screen.

Question #2 I have the following code setup so from my form that generates
the report:

="Report Based On: " & Forms!frmActionTaken!cboActionTaken

When I preview the report the name comes up.. but when I print I get the
#name? error. Any suggestions...

Thanks
R~
 
G

Guest

I have another database that uses the same code for the #name? error..... and
it prints fine.... I double checked the referances under vba. The only
differance is the current one does not have "microsoft calendar control
11.0". I looked thru all of them and could not find it... Could this be the
problem??

I figured the box grow shrink only goes vertical not left or right.....

This other error is driving me nuts... Is there anywhere else I should be
looking???

Thanks
R~
 
M

Marshall Barton

Rhett_Y said:
I have set the can shrink can grow to a text box to "Yes". When I view
the report the box does not grow or shrink, it stays the same. I then read
that it is for when you print only. I printed the report and it did not grow
or shrink it stayed the same as it looked on the screen.

Question #2 I have the following code setup so from my form that generates
the report:

="Report Based On: " & Forms!frmActionTaken!cboActionTaken

When I preview the report the name comes up.. but when I print I get the
#name? error. Any suggestions...


There should not be any difference between previewing and
printing a report. CanGrow/CanShrink **on a form** will
only do their thing when printing/previewing, but not in
form view.

Generally, the #name error means that the form or control
name is not spelled right or that the form is no longer
open.
 
G

Guest

Marshall...

I figured out the can shrink can grow part... It is the #name? error
that is getting to me..... here is the code for the form that I generates
the report:

Private Sub cmdCancel_Click()
DoCmd.Close acForm, "frmActionTaken"
End Sub

Private Sub cmdOk_Click()
stDocName = "rptActionTaken"
DoCmd.OpenReport "rptActionTaken", acViewPreview, acEdit
DoCmd.Close acForm, "frmActionTaken"
End Sub

Then here is the code that I have on the report that previews fine but when
I print I get the #name? error.

="Report Based On: " & Forms!frmActionTaken!cboActionTaken

I have been pulling my hair out...lol... Any help is greatly appreciated..

R~
 
G

Guest

Marshall...

Ok I took out the close form portion in the top part and in the close form
in the bottom portion of the VBA and it worked... is there anyway I can set
it up so that the form still closes and I am able to print the report without
the errors..??

At least you figured it out for me..lol.... Thank you!!!! Thank you...

Thanks again
R~
 
M

Marshall Barton

The straightforward way to close the form is to do it in the
report's Close event.
 
G

Guest

Marshall..

Thanks.. I will give it a try..

R~

Marshall Barton said:
The straightforward way to close the form is to do it in the
report's Close event.
--
Marsh
MVP [MS Access]


Rhett_Y said:
Ok I took out the close form portion in the top part and in the close form
in the bottom portion of the VBA and it worked... is there anyway I can set
it up so that the form still closes and I am able to print the report without
the errors..??
 

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