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  

How to know the last record at the Detail_Format event



 
 
Thread Tools Display Modes
  #11  
Old November 17th, 2005, 07:38 AM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default How to know the last record at the Detail_Format event

I have changed the code. The line position in the first page is right but
for the next pages, the line position is wrong.
Thanks.

"Marshall Barton" wrote in message
...
Thank you for diagnosing my typo. I could have looked at it
forever without seeing it. Change that line to:

Me.txtBottom = Me.Top + Me.Height - MARGIN

I'm still concerned about what to do when a detail is split
across a page boundary.
--
Marsh
MVP [MS Access]


Vensia wrote:
At the detail section, there are several text boxes and 2 subreports.
The subreports can grow to several pages.
I have check Me.Section(0).Height at Detail_Print and find the height of
detail section is not changed although the subreport grow to several

pages.
That's why the below code doesn't take effect.

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Me.txtBottom = Me.Top + Me.Section(0).Height - MARGIN
End Sub


Vensia wrote:
I'm talking about the detail section of main report.
I put all of your code in the main report.
The main report has a subreport (can grow) at its detail section.
There is only one record in the detail of main report.
So I find that the height of detail section is fixed when the report

is
running.



  #12  
Old November 17th, 2005, 04:21 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default How to know the last record at the Detail_Format event

Could you be more specific about how the position is wromg?

Are you sure the line Me.txtBottom = . . . is in the detail
section's Print event?

Please post the relevant code as it is now.
--
Marsh
MVP [MS Access]


Vensia wrote:
I have changed the code. The line position in the first page is right but
for the next pages, the line position is wrong.


"Marshall Barton" wrote
Thank you for diagnosing my typo. I could have looked at it
forever without seeing it. Change that line to:

Me.txtBottom = Me.Top + Me.Height - MARGIN

I'm still concerned about what to do when a detail is split
across a page boundary.


Vensia wrote:
At the detail section, there are several text boxes and 2 subreports.
The subreports can grow to several pages.
I have check Me.Section(0).Height at Detail_Print and find the height of
detail section is not changed although the subreport grow to several

pages.
That's why the below code doesn't take effect.

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Me.txtBottom = Me.Top + Me.Section(0).Height - MARGIN
End Sub


Vensia wrote:
I'm talking about the detail section of main report.
I put all of your code in the main report.
The main report has a subreport (can grow) at its detail section.
There is only one record in the detail of main report.
So I find that the height of detail section is fixed when the report

is
running.

  #13  
Old November 18th, 2005, 03:49 AM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default How to know the last record at the Detail_Format event

"Vensia" wrote

Actually I want to add a horizontal line after the last record for every
page except the last page.


How about just putting a line at the very top of the Page Footer. If you
don't use a Page Footer, make one just for your line. You can set a Report
level variable in the Report Footer, sense it in the Page Footer, and make
the line invisible if you don't want one on the very last page.

That will put a horizontal line after the last record on the page.

Larry Linson
Microsoft Access MVP


  #14  
Old November 21st, 2005, 10:32 AM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default How to know the last record at the Detail_Format event

I have checked and the line code is in the detail section's Print event.
The line in the first page is at the right position, in the second page, the
line is at the above, and in the third pages, the line is not seemed.

"Marshall Barton" wrote in message
...
Could you be more specific about how the position is wromg?

Are you sure the line Me.txtBottom = . . . is in the detail
section's Print event?

Please post the relevant code as it is now.
--
Marsh
MVP [MS Access]


Vensia wrote:
I have changed the code. The line position in the first page is right but
for the next pages, the line position is wrong.


"Marshall Barton" wrote
Thank you for diagnosing my typo. I could have looked at it
forever without seeing it. Change that line to:

Me.txtBottom = Me.Top + Me.Height - MARGIN

I'm still concerned about what to do when a detail is split
across a page boundary.


Vensia wrote:
At the detail section, there are several text boxes and 2 subreports.
The subreports can grow to several pages.
I have check Me.Section(0).Height at Detail_Print and find the height

of
detail section is not changed although the subreport grow to several

pages.
That's why the below code doesn't take effect.

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Me.txtBottom = Me.Top + Me.Section(0).Height - MARGIN
End Sub


Vensia wrote:
I'm talking about the detail section of main report.
I put all of your code in the main report.
The main report has a subreport (can grow) at its detail section.
There is only one record in the detail of main report.
So I find that the height of detail section is fixed when the

report
is
running.



  #15  
Old November 21st, 2005, 05:45 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default How to know the last record at the Detail_Format event

I'm afarid that I do not understand what you are saying.

I need to verify the code that you are actually using.
Please post a Copy/Paste of both event procedures as you now
have them.

I don't understand what you mean by "in the second page, the
line is at the above, and in the third pages, the line is
not seemed". Please provide more specific information about
where the line is actually appearing.

I also need to know what you want to happen if the main
report detail is entirely on the same page as the line or if
the detail is split across multiple pages.

As Larry asked elsewhere in this thread, why not put the
line in the page footer section instead of all this fooling
around???
--
Marsh
MVP [MS Access]


Vensia wrote:
I have checked and the line code is in the detail section's Print event.
The line in the first page is at the right position, in the second page, the
line is at the above, and in the third pages, the line is not seemed.

"Marshall Barton" wrote
Could you be more specific about how the position is wromg?

Are you sure the line Me.txtBottom = . . . is in the detail
section's Print event?

Please post the relevant code as it is now.


Vensia wrote:
I have changed the code. The line position in the first page is right but
for the next pages, the line position is wrong.


"Marshall Barton" wrote
Thank you for diagnosing my typo. I could have looked at it
forever without seeing it. Change that line to:

Me.txtBottom = Me.Top + Me.Height - MARGIN

I'm still concerned about what to do when a detail is split
across a page boundary.


Vensia wrote:
At the detail section, there are several text boxes and 2 subreports.
The subreports can grow to several pages.
I have check Me.Section(0).Height at Detail_Print and find the height

of
detail section is not changed although the subreport grow to several
pages.
That's why the below code doesn't take effect.

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Me.txtBottom = Me.Top + Me.Section(0).Height - MARGIN
End Sub


Vensia wrote:
I'm talking about the detail section of main report.
I put all of your code in the main report.
The main report has a subreport (can grow) at its detail section.
There is only one record in the detail of main report.
So I find that the height of detail section is fixed when the
report is running.

 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Access and appending records and Excel into Word Mail Merge rmoritzky General Discussion 2 October 20th, 2005 04:05 PM
Combo Box unnecessary Not In List event after adding a record gcard Using Forms 1 June 27th, 2005 03:36 PM
Inspect record, replace null field on output RNUSZ@OKDPS Setting Up & Running Reports 3 April 5th, 2005 04:27 PM
Prevent Blank Records being written. Need Help. Robert Nusz @ DPS Using Forms 4 December 29th, 2004 05:15 PM
Cursor Positioning Colin Hammond General Discussion 3 November 2nd, 2004 08:42 PM


All times are GMT +1. The time now is 12:40 AM.


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