Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / January 2005

Tip: Looking for answers? Try searching our database.

OpenArgs Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Don - 29 Jan 2005 14:15 GMT
Are there any tricks to using OpenArgs?  I am trying to pass a simple string
to a report I am opening and always get NULL in the report (Me.OpenArgs).
The examples in Help see pretty straight forward, but I can't see where I am
messing up.  Any suggestions?

Thanks!

Don

In command button OnClick code:

   stDocName = "rptStaffingDocument"
   DoCmd.OpenReport stDocName, acViewNormal, , , acWindowNormal, "Full"

In the reports Report_Open code
   strStaffingScope = Me.OpenArgs
Allen Browne - 29 Jan 2005 14:42 GMT
What you have should be fine provided:

- the report is not already open (in which case it recognises the OpenArgs
from when it was opened), and

- this is Access 2002 or 2003 (earlier versions did not have OpenArgs for
reports), and

- strStaffingScope is not a control on the report (because Report_Open is
too early to assign a value to a control).

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Are there any tricks to using OpenArgs?  I am trying to pass a simple
> string
[quoted text clipped - 14 lines]
> In the reports Report_Open code
>    strStaffingScope = Me.OpenArgs
Don - 29 Jan 2005 15:19 GMT
Allen,

Looks like the problem was having the report open in design mode.  Based on
your comments, I closed and restarted everything.  Now works like a charm!

Thanks!

Don

> What you have should be fine provided:
>
[quoted text clipped - 25 lines]
> > In the reports Report_Open code
> >    strStaffingScope = Me.OpenArgs
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.