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

Generating a MS Access Report from a User Defined Array

Status
Not open for further replies.

seenoorao

Programmer
Sep 6, 2005
8
US
Hi,

I have an array which is created by a function in my .Adp file.
I need to generate a ms access report based on this Array.
How can I achieve this?

Tia.
 
You need to write the contents of the array to a table then base the report on the table.

John
 
Hi
Would it be possible to build a report on-the-fly, or use a 'blank' report with a series of text boxes that could be filled in using the Detail On Format event? I tried this, and it seemed to work.

[tt]'Module:
Public MyArray(0, 1)

Sub ArrayReport()
MyArray(0, 0) = "Hello"
MyArray(0, 1) = "World"

DoCmd.OpenReport "rptArray", acViewPreview
End Sub
'=================
'Report:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.Text0 = MyArray(0, 0)
Me.Text2 = MyArray(0, 1)
End Sub[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top