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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to repeat a text label in detail section 2

Status
Not open for further replies.

ruru9292

IS-IT--Management
Jan 31, 2005
29
US
Hello experts,

I want to print the same label in the detail section as a rows using For/Next command. If for example my bound field on a form has a value of 5 then I want to print 5 labels and so on. Any Ideas? Thanks in advance

 
Consider creating a table (tblNums) with a single numeric field (Num) and add values 1 - whatever.

Add this table to your report's record source query. You can then set the criteria under the Num field to something like:
<=Form!frmYourForm!txtNumOfCopies

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]
 
Thanks for your fast reply. However; if i set the criteria for Num field in Query to be equal to <=Form!frmYourForm!txtNumOfCopies then the query will pull only one record, and if added many records into the table with a values of ones then the query will pull more records than the txtNumOfCopies. So where is the trick to print only # of records as Form!frmYourForm!txtNumOfCopies? thanks.
 
ruru9292--if you set the criteria to be <=Form!frmYourForm!txtNumOfCopies then it will put that number of records. Not sure why you think it will pull only one record? Your new table tblNums will have this data:

1
2
3
4
5
.
.
.


so if you have <=5, exactly five rows will be created in the rowsource for your report.



Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I numbered the records in sequence up to 100 and use criteria above. I was limited to 100 record which is okay for my case. thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top