Access Tip of the Day


Pass values to a report object with OpenArgs (Access 2002)


Access 2002 is the first version to support the OpenArgs property for the Report object. Previously, this property was available only with forms. As with the form property, the report OpenArgs property is accessible only through Visual Basic for Applications (VBA) code or a macro. The property's purpose is to pass a value to the report as the report is opened by the DoCmd object's OpenReport method in the form

DoCmd.OpenReport(reportname, view, filtername, wherecondition, windowmode, OpenArgs)

where reportname is the name of a Report object and the optional OpenArgs argument accepts a Variant. Once the report is opened, the value passed to the argument becomes the report's OpenArgs property value. You can, in turn, use this value for such things as conditionally executing code statements or customizing elements of the report.



(Content provided by Element K Journals)


(Note: Your browser is set to refuse cookies. As a result, you may frequently see previously-viewed tips)
 
PrintPrint CloseClose

Copyright © 2001 - 2026 MJ Technologies, LLC.  All rights reserved.