Solved

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

Posted on 2006-11-28
10
319 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 119

Accepted Solution

by:
Rey Obrero earned 100 total points
Comment Utility
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
Comment Utility
Are you using global variables with multiple concurrent users?
0
 
LVL 39

Assisted Solution

by:stevbe
stevbe earned 50 total points
Comment Utility
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
 
LVL 19

Author Comment

by:Eric Sherman
Comment Utility
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
Comment Utility
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 19

Author Comment

by:Eric Sherman
Comment Utility
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
Comment Utility
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
Comment Utility
>>> 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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

771 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now