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!

using variables in reports, runtime error: 2147352567

Status
Not open for further replies.

Bobnz

IS-IT--Management
Aug 19, 2002
116
NZ
using variables in reports, runtime error: 2147352567


I get the above error when I try to preview a report, also says "cant assign value to object".
I have a report with controls that I want to assign values to using variables.

the variables are global so...

txtcontrol = variable in open event of report should work?

B
 
Try to assign the values in the on format event of the section where the controls reside in stead.

Roy-Vidar
 
I'm using access 2000 and there isn't an onformat event, not in the properties window for the report nor in the codeview of the report.

thanks for the reply though

B
 
I found the onformat event its a section event not a form event.

Still wouldn't accept the variable values.

B
 
Without knowing what you're trying to do, it's hard to guess. More info, current code, what you wish to achieve, is the controls bound or calculated, are the publics real publics or are they defined within a forms/reports module, do they have any value when this is run... (some hints on how to get the most out of the membership and how to get the best answers, may be found here faq181-2886, #14 is perhaps relevant)

Roy-Vidar
 
Thanks for the reply Roy, I have found a way around the problem. The report is based on a query, In the query I used functions in the criteria part of the field to return the values needed

jnum is the global variable

Code:
Function return_jobnumber() As String    
    return_jobnumber = jnum    
End Function

B
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top