Hi
I have an array that is filled by code in the on open event.
I need to display the values from the array on my rpt.
VBA won't let me create a public array...
Q: how can I get my array's data to the report's txtboxs?
I think you can create a module and in the declaration section declare the public array.
[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
if you are using this inside the same report, why not create a Report Level Array, by dimming it in the General Declarations area.
Option Compare Database
Option Explicit
Dim strArray(1 To 4) As String
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
txt1 = strArray(1)
txt2 = strArray(2)
txt3 = strArray(3)
txt4 = strArray(4)
End Sub
Private Sub Report_Open(Cancel As Integer)
Dim x As Integer
For x = 1 To 4
strArray(x) = "This is Text " & x
Next x
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.