Rectangle Box

G

Guest

In the detail section on the report I have two memo fields one on top of each
other. They can grow, however, I place a rectangle box arounnd the fields,
the fields grow but the box does not. I tried the change the event for the
rectangle box to grow, but there's isn't any. I read other postings, one
suggested I put this in the print detail:
Me.Line (0,0)-Step(Me.Width,Me.Section(0).Height), , B

But this gives me a macro error when I try to print it

Is there a simple way to do this?
 
S

Stephen Lebans

Me.Line (0,0)-Step(Me.Width,Me.Section(0).Height), , B
You are missing the second last param:
Me.Line (0,0)-Step(Me.Width,Me.Section(0).Height), 0, B



--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
M

Marshall Barton

bladelock said:
In the detail section on the report I have two memo fields one on top of each
other. They can grow, however, I place a rectangle box arounnd the fields,
the fields grow but the box does not. I tried the change the event for the
rectangle box to grow, but there's isn't any. I read other postings, one
suggested I put this in the print detail:
Me.Line (0,0)-Step(Me.Width,Me.Section(0).Height), , B

But this gives me a macro error when I try to print it

Is there a simple way to do this?


That line needs to be in the detail section's Print event
**procedure**. It sounds like you tried to use it in a
macro (or in the OnPrint property).

BTW, that line of code draws the rectangle around the entire
detail section. If you want the rectangle around just one
text box, it would be more like:

With Me.thetextboxname
Me.Line (.Left, .Top) - Step(.Width, .Height), , B
End With
 
G

Guest

I put this:
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

Me.Line (0, 0)-Step(Me.Width, Me.Section(0).Height), 0, B

End Sub

The error message reads:
Can't find the macro '.'
 
S

Stephen Lebans

Comment out the one line of code. Run your report. Does it still generate
the error message?

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
G

Guest

I did what you told me to do and I commented out that one line of code. I got
the same error message
 
G

Guest

Isn't this the Detail section of the Print event? I don't know where to put
this code that you're talking about. Please advice if I'm doing something
wrong.
 
S

Stephen Lebans

Well then it is not your call to the Report object's Line method that is
causing the error.

Can you copy and paste ALL of the code behind this report into a reply so we
can have a peek?

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
G

Guest

I right click on the Detail Bar on the report and selected Properties (this
is everything) Should this code be somewhere else, maybe I placed it in the
wrong place?:

Option Compare Database

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

End Sub

Private Sub Report_Open(Cancel As Integer)

End Sub

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

Me.Line (0, 0)-Step(Me.Width, Me.Section(0).Height), 0, B

End Sub
 
M

Marshall Barton

bladelock said:
Isn't this the Detail section of the Print event? I don't know where to put
this code that you're talking about. Please advice if I'm doing something
wrong.


I see elsewhere in this thread that the line is in the right
place and that the error is the same even when you remove
the line. From that, I conclude that the error is caused by
something else altogether.

What is the full error message?

What do you have in the Detail section's OnPrint and
OnFormat properties?
 

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