473,394 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Form's OpenArgs property suddenly becomes null

Seth Schrock
2,965 Expert 2GB
I'm using Access 2010 and I was stepping through a large amount of code (multiple procedures being called from both the main form's module and subforms' modules) that using the main form's OpenArgs property quite a bit. Everything was working fine, and then all of a sudden, I got an error that said invalid use of null. In my debugging, I discovered that the main form's OpenArgs property was null when it should have been (and was previously) populated with a number. I had this happen multiple times. Is the OpenArgs property unreliable? I ended up just creating a global variable and setting that when the line before I opened the form and then everything works great. Almost all of my Access experience has been with Access 2010 so I'm not sure if this is only related to that version or if it affects multiple versions.
Nov 24 '13 #1

✓ answered by NeoPa

It's good practice to save the OpenArgs value as soon as you can.

My experience is that it's there available at the start of the Form_Open() event procedure, but becomes increasingly unreliable after that. This is over many versions.

2 1446
NeoPa
32,556 Expert Mod 16PB
It's good practice to save the OpenArgs value as soon as you can.

My experience is that it's there available at the start of the Form_Open() event procedure, but becomes increasingly unreliable after that. This is over many versions.
Nov 24 '13 #2
Seth Schrock
2,965 Expert 2GB
I was wondering. Well, glad to know that it isn't just me :)
Nov 24 '13 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Li Pang | last post by:
Hi, I create a web site in a Windows 2003 server/IIS6, and I used asp pages to get ServerVariables. After I set FrontPage Extension 2002, some ServerVariables like LOGON_USER become null. Any...
1
by: TN Bella | last post by:
Hello, I was looking through the older posts for a solution to this problem, but I am still confused on how to fix my problem. There are two dates on my form, one (txtInvDate) is entered by the...
1
by: MrFez | last post by:
I have an webform from which I open a child window to display a calendar. When a date is selected in the calendar window it attempts to set the value of a textbox in the main (parent) window by...
1
by: Ringo | last post by:
I have a class that wraps up data from a database. It's consumed by a procedure that populates another database. I thought I'd been pretty clever with the design until I realised that a null would...
1
by: Alien2_51 | last post by:
I have a form with it's AcceptButton property set to a button on my forms click event, when I hit enter in runtime on the form, the cursor goes to an hourglass for a second, as if it were doing...
4
by: meltedown | last post by:
I have this on a web page <input type='hidden' name ='military' value=1> and this in a javascript function: alert(document.form1.military.value); The military value comes up null.
3
by: jarnie | last post by:
I am attempting to make a form which has alpha transparency that varies across the form, similar to the Adobe splash screens and launchy: http://www.launchy.net/images/screenshot_sheep.jpg ...
3
by: hehe panda | last post by:
I have Access as FrontEnd and SQL server as Backend. After I call a stored procedure on the SQL server, I try to read the fields in the recordset. However, one of the column can only be used once....
10
by: hehe panda | last post by:
I have Access as FrontEnd and SQL server as Backend. After I call a stored procedure on the SQL server, I try to read the fields in the recordset. However, one of the column can only be used once....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.