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

Report Field Data

Status
Not open for further replies.

solo7

Technical User
Mar 14, 2001
243
NO
I am trying to assign data from a'Public' variable to a text box in one of my reports.

Following a sugestion in the general forum I have created a Funcion in a module ie :-

Public Function GetCartons() As Integer
GetCartons = VarCartons
End Function


(Where 'VarCartons is my 'Public' variable). Then in my report all I do is put =[GetCartons] in the data source.

But the data is not populated in the function when I check it with a breakpoint - all the data is assigned to the correct varaibles, and VarCartons holds the right data outside of the function, but inside the function there is no data ...
Can anyone point me in the right direction ????
 
You need to put the following in your controlsource:

=GetCartons()

As you have it now it's looking for a parameter or field called [GetCartons].
 
Thanks for that Jerry. The typo was an obvious to me once you pointed it out .
However even with the now correct function call, the data from my Public Variables doesn't pass to the funtion GetCartons() - there's nothing there at all, even though VarCartons does hold the correct data.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top