Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to add more fields values in a footer section

Status
Not open for further replies.

mirsusu

Technical User
Mar 15, 2007
4
RO
I have a table like this:
number Post
300120 1,05
300120 1,06
300120 1,07

I need to make a report and to print all the info in this way:

number Post1 Post2 Post3
300120 1,05 1,06 1,07.

I have made a report in which I have set not visible the details section and i have add the fields number and post to the number Footer, by I can see only the first value.

Can you please help me add all the values?

Mircea.

 
You could place text boxes for txtNumber and txtPost in your detail section of your report. Add another text box:
Name: txtCount
Control Source: =1
Running Sum: Over Group
Visible: No
Add a Group or Report Footer Section that is the same height as the detail section.
Add code to the On Format event of the Detail Section:
Dim intSpacing as Integer
intSpacing = 1000
Me.txtPost.Left = intSpacing * txtCount
Me.MoveLayout = False
You might need to play with the intSpacing value.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 

Thank you is working perfectly.

I have forgotten something, that under post1 I want to have for all the values from field number the same value for post:

I have a table like this:
number Post
300120 1,05
300120 1,06
300120 1,07
300121 1,08
300121 1,05

I need to make a report and to print all the info in this way:

number Post1 Post2 Post3 Post4
300120 1,05 1,06 1,07
300121 1,05 1,08

Many thanks.
Mircea
 
I assume your [red],[/red] is the equivalent of my use of [red].[/red] . If these are numbers as I assume, you can base the left property of the text box on some calculation of the Post value.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Yes is true there are numbers. Can you please give me an small example.

Thx,
Mircea
 
Based on your sample values, I would suggest using this line of code to set the Left property of the text box. You may need to do some other "playing" with the numbers.
Code:
 Me.txtPost.Left = intSpacing * (1 - Me.txtPost) * 100

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Thank you, looks really great.

I have to say that I know how to resolve this problem with Crystal Reports but not with Access, has-been a great lesson for me.

Thank you,
Mircea
 
There should be no need for Crystal Reports if you have Access ;-)

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top