A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Rectangle Box



 
 
Thread Tools Display Modes
  #1  
Old April 5th, 2007, 04:28 PM posted to microsoft.public.access.reports
bladelock
external usenet poster
 
Posts: 37
Default Rectangle Box

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?
  #2  
Old April 5th, 2007, 06:12 PM posted to microsoft.public.access.reports
Stephen Lebans
external usenet poster
 
Posts: 619
Default Rectangle Box

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.


"bladelock" wrote in message
news
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?



  #3  
Old April 5th, 2007, 06:37 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Rectangle Box

bladelock wrote:

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

--
Marsh
MVP [MS Access]
  #4  
Old April 5th, 2007, 07:24 PM posted to microsoft.public.access.reports
bladelock
external usenet poster
 
Posts: 37
Default Rectangle Box

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 '.'

"Stephen Lebans" wrote:

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.


"bladelock" wrote in message
news
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?




  #5  
Old April 5th, 2007, 09:04 PM posted to microsoft.public.access.reports
Stephen Lebans
external usenet poster
 
Posts: 619
Default Rectangle Box

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.


"bladelock" wrote in message
...
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 '.'

"Stephen Lebans" wrote:

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.


"bladelock" wrote in message
news
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?






  #6  
Old April 6th, 2007, 02:44 PM posted to microsoft.public.access.reports
bladelock
external usenet poster
 
Posts: 37
Default Rectangle Box

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

"Stephen Lebans" wrote:

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.


"bladelock" wrote in message
...
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 '.'

"Stephen Lebans" wrote:

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.


"bladelock" wrote in message
news 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?






  #7  
Old April 6th, 2007, 02:46 PM posted to microsoft.public.access.reports
bladelock
external usenet poster
 
Posts: 37
Default Rectangle Box

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.

"Marshall Barton" wrote:

bladelock wrote:

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

--
Marsh
MVP [MS Access]

  #8  
Old April 6th, 2007, 03:04 PM posted to microsoft.public.access.reports
Stephen Lebans
external usenet poster
 
Posts: 619
Default Rectangle Box

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.


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

"Stephen Lebans" wrote:

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.


"bladelock" wrote in message
...
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 '.'

"Stephen Lebans" wrote:

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.


"bladelock" wrote in message
news 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?








  #9  
Old April 6th, 2007, 03:42 PM posted to microsoft.public.access.reports
bladelock
external usenet poster
 
Posts: 37
Default Rectangle Box

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




"Stephen Lebans" wrote:

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.


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

"Stephen Lebans" wrote:

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.


"bladelock" wrote in message
...
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 '.'

"Stephen Lebans" wrote:

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.


"bladelock" wrote in message
news 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?









  #10  
Old April 6th, 2007, 05:30 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Rectangle Box

bladelock wrote:

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?

--
Marsh
MVP [MS Access]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:07 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.