Solved

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

Posted on 2006-11-28
10
325 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
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
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!

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access Database 5 47
Save Selections in MS Access 3 31
MS Access, hourly employee status 8 43
Check for emails from a particular domain in outlook via VBA - MS ACCESS 9 39
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
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…

749 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