string / texts in the page footer

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear friends,
I am a newcomer in this newsgroup ,I wonder this morning (about 11.00 am) I saw my question.
but right now it is disappeared ? do I open the wrong place ?.
ok. If you do not mind,I just want to know how to put strings or texts in the page total.
as I read in the "access cookbook",we can create total in the page footer.so that we can see the total in each page.
and I want to buy a VBA book,which one ? I need a vba book to understand better.

thanks for the help.
 
Liem:

you post is still there, however if you've opened it and read it, and have
the "hide read messages" checked in Outlook express (View -> Current View ->
Hide read messages) then it won't display again in your reader.

To create a total in each page, you've got to use either

1.) Use groups that display a single group for each page with a group header
and footer. In the detail section add a second control with the same field
control source that you want to total by page, set its control name to
TotalVal or something like that, and set the control's running sum property
to "OverGroup". Once you see that the running sum is correct, then set that
control's visible property to No. Then in the group footer, add a control
and set its control source to be = [TotalVal]. This will display the last
value (i.e. the last current total for the group) from the detail section so
you've got the total for that page; again assuming that the group will only
take one page.

2.) If you can't have a single page per group, then you've got to use VBA to
create the sum for the current page. This is pretty simple to do.

a.) Dimension a variable in the report's general section of its module, e.g.
Dim sngPageTotal as Single

b.) In the On Page event of the report, add code like this:

sngPageTotal = 0

c.) In the On Print event of the Detail section add code like this:

sngPageTotal = sngPageTotal + Me!ControlYouWantToTotalForThePage

d.) In the Page Footer, add an unbound control and in the On Print event for
that section add code like this:

Me!PageFooterControlName = sngPageTotal
--
Steve Arbaugh
ACG Soft
http://ourworld.compuserve.com/homepages/attac-cg

liem khen said:
Dear friends,
I am a newcomer in this newsgroup ,I wonder this morning (about 11.00 am) I saw my question.
but right now it is disappeared ? do I open the wrong place ?.
ok. If you do not mind,I just want to know how to put strings or texts in the page total.
as I read in the "access cookbook",we can create total in the page
footer.so that we can see the total in each page.
 
So, use an unbound control and simply use VBA to set the text you need into
the control, or set the control's control source to be = "your text here"
 
Example: Me!txtpageTotalExpl = "This is how I calculated the Total for this
report"

--
Steve Arbaugh
ACG Soft
http://ourworld.compuserve.com/homepages/attac-cg

liem khen said:
I wrote this :

the unbound control :[txtpagetotalexpl] --> I want to explain the total (in text or sentences)

in the format event page header:
private sub page header0_format(cancel as interger,formatcount as interger)
[txtpagetotalexpl]=0
end sub

private sub reportheader0_format(cancel as interger,formatcount as interger)
[txtpagetotalexpl]=0
end sub

and in the onprint for the detail section ,I have not written any
procedure,because it always appear 0 (zero) in the page footer.
 
I am sorry steve
I did not tell you clearly
eg.
if the total $25000,I want to show it in text --> twenty five thousand dollar
can we do this ? (also in the page footer
I just can show the text in the report footer

again Steve I am sorry confusing you
anyhow thanks for your help.
 
Liem:

If (A_Post OR A_Question) = Clear Then
A_Focused_Answer = True
Else
A_Focused_Answer = Impossible
End If

;-)

To convert numbers to dollars, take a look at our web site and in the free
files area you'll find a download called Convert Numbers to Words which has
all the code you need......
 
Back
Top