Solved

Forms.OpenArgs Lost It's Value For No Obvious Reason, Is It Possible???

Posted on 2006-11-28
10
332 Views
Last Modified: 2012-06-27
I have a form that's used as the startup form of an Access 2k front-end application.  Here the user basically selects a company  (02 = XYZ Company South, 03 = XYZ Company North, etc.).  After the selection is made the OnClick event will open the main form for the application (Form1) setting the OpenArgs of this form to the company selection (02 or 03, etc.). This OpenArgs is used in various functions throughout the application like linking to different backend servers based on this value and I noticed when I was testing a new report the OpenArgs value of the form was empty and none of the code for the report did anything with the OpenArgs value for the main form although some VBA code for the report did error out on something totally different.

The question is has anyone experienced the OpenArgs value of a form being reset or emptied after it was set for no apparent reason???

Thanks,

ET
0
Comment
Question by:Eric Sherman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 100 total points
ID: 18030523
No. i have not experienced that.
it is  possible that  the openargs parameter was reset in one of the set of codes that was executed.
0
 
LVL 34

Expert Comment

by:jefftwilley
ID: 18030564
Are you using global variables with multiple concurrent users?
0
 
LVL 39

Assisted Solution

by:stevbe
stevbe earned 50 total points
ID: 18030592
are you sure you are checking the OpenArgs of the form and not the report? Don't think they existed for reports in 2000.
is the form opened more than 1 time ... this will reset the OpenArgs value
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 19

Author Comment

by:Eric Sherman
ID: 18030698
capricorn1 ....

No, the VBA code that runs with the report does absolutely nothing with the main form's OpenArgs.


jefftwilley .....

Yes, I am using global variables with multiple concurrent users.  May I ask what impact this would have on the OpenArgs of the main form of the application???


stevbe ....

Yes I'm checking the OpenArgs of the form and not a report.
No, From1 was only opened 1 time.


ET
0
 
LVL 34

Expert Comment

by:jefftwilley
ID: 18030773
Thinking out loud, not knowing your front end and how it's distributed.....if one user logs in and sets the main form thusly 02 = XYZ Company South then another user selects 03 = XYZ Company North, would this not upset your opening arguements for the front end?

Ignore if each user has his own front end...

do you store the company value on the main form once it's selected for use in filtering later on?
0
 
LVL 19

Author Comment

by:Eric Sherman
ID: 18030856
jeffwilley ....

Each user has his own front end ....

>>>do you store the company value on the main form once it's selected for use in filtering later on?<<<<<

Actually, that's what I'm using the OpenArgs value for as opposed to storing the comany value to a hidden control on the main form.  I figured the OpenArgs value would be more reliable.

ET
0
 
LVL 34

Expert Comment

by:jefftwilley
ID: 18030896
don't you hate that!! lol...so now you switchin to the hidden value? reliability. who builds for reliability anymore?
0
 
LVL 19

Author Comment

by:Eric Sherman
ID: 18030992
>>> don't you hate that!! lol...so now you switchin to the hidden value? reliability. who builds for reliability anymore?<<<


I do ....  :-)


ET
0
 
LVL 65

Assisted Solution

by:rockiroads
rockiroads earned 100 total points
ID: 18031101
I found OpenArgs can be null during development (discovered today as I experienced it earlier)

eg

u have one form (say call it form A), u leave it open (form view)

u have another form (form B), u make some changes to it, and save it. form may still be left in design view
when u then run your other form (form A) to open this form (form B) thats left in design view, OpenArgs is empty
However, if I close the form (form B) after making changes, then it works fine

obviously a difference if left in design view, perhaps it may be due to the way the form is open. From scratch or from design view.

Im sure same probs would occur with reports.

Otherwise I have never experienced any problems with OpenArgs
0
 
LVL 19

Author Comment

by:Eric Sherman
ID: 18038260
Thanks all for the response ....

I think all responses confirmed what I was asking which is .......

"Can the OpenArgs value of a form being reset or emptied after it was set for no apparent reason???"

And the answer to that is no.  The problem I experienced probably has something to do with rockiroads comments about OpenArgs can be null during development (see above comments).  Something I probably did to that form durin development knocked out the OpenArgs value as I can't seem to re-create the problem after running various test and functions using the OpenArgs value.

ET

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question