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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|