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

how to print variables in a report

Status
Not open for further replies.

kaul1jos

Technical User
Jan 5, 2001
76
NL
In my database are some reports and filled arrays (by macro)
How can I print the value of the array on a report line?

thnx
 
I filled up the (multidimensional)array in a macro defined in a module. (Access 200x)

In the array are some fields from the records and some generated items.
 
I've only ever used arrays in SQL to count items, etc., like:

Dim intI as integer
For i=1 to 10
debug.print me("txtUser"& cstr(i)).Name
Next

Maybe you can append your array to a temporary table, and then have your report based on that?

Jim DeGeorge [wavey]
 
Jim almost got this right. You can use the Print method to display your values in the report. Place code in the On Format event of the report section where you want to print your values:

Dim intI as integer
Dim lngX as Long 'left position
lngX = 720 'half inch
For intI=1 to 10
Me.CurrentX = lngX
Me.print ArrayName(intI)
Next


Duane
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top