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!

help with syntax

Status
Not open for further replies.

ProgramError

Programmer
Mar 2, 2005
1,027
GB
im trying to get this to work, but i am rcieving error regarding the syntax. progno IS on the report.

srtReportname = "testrecord"

tempProgNo = Reports![strReportName]!progno

Accessing the control directly with...

tempProgNo = Reports![testrecord]!progno

works fine, but I want to use the code on other reports without having to type an individual line with the report name for every one of them!

Ian Mayor (UK)
Program Error
Programming is 1% coding, 50% error checking and 49% sweat as your application bombs out in front of the client.
 
Try:

Reports(strReportName)!progno

Ed Metcalfe.

Please do not feed the trolls.....
 
Thanks works fine...

saw that in the access help files but didn't think it applied or would work in this case.


Ian Mayor (UK)
Program Error
Programming is 1% coding, 50% error checking and 49% sweat as your application bombs out in front of the client.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top