Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2006-11-28
10
Medium Priority
?
341 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 300 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 150 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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
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 300 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 learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

609 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