473,404 Members | 2,174 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,404 software developers and data experts.

MS Access Invalid use of null error

I inherited a database at work and everything was working fine for about 4 months. All of a sudden, I started getting an "Invalid use of null" error when I tried to open an unbound main form that contains a bound subform. The subform has a query as its data source.

After many hours of analysis, it turns out that on the subform there is a text box whose control source property is a function. This function is being called before the Current event and all of the variables are null even though the variables are part of the query that make up the subform's record source. That is when I get the "Invalid use of null" error message.

Oddly enough, everything works fine for some users. For these users, the Current event fires before the text box's "control source" function and so the variables all have values. But the code is exactly the same, so I don't know what to do.

I'm very confused and any feedback would be appreciated.

Thanks.
Sep 5 '13 #1
5 5157
Rabbit
12,516 Expert Mod 8TB
You'll need to handle the null. Probably through Nz or something. But that's all I can say unless you post the code.
Sep 6 '13 #2
zmbd
5,501 Expert Mod 4TB
You also need to tell us the versions of everyone using the database. Has there been a recent upgrade?
Sep 7 '13 #3
@Rabbit
Rabbit,

Thank you so much for responding. Sorry I haven't responded sooner but I have been away from my job for the last week.

But your answer got me to think simply. I check for a null value and the beginning of the function, and exit if null. It seems to work.

I'm still perplexed as to why the functions are not executing in the same order but I have so much on my plate at work, I can't spend too much time on this now.
Sep 17 '13 #4
@zmbd
Hi, zmbd,

The database was originally written in Access 97 and upgraded to 2010 (I had no part in either process). I made some major changes to the database and fear that I decompiled incorrectly.

All users are using 2010.

Thanks for replying!
Sep 17 '13 #5
zmbd
5,501 Expert Mod 4TB
the code would be helpfull; however, I'm afraid that what is going to happen is that you will have to create a new file in the current version of access and then import everything from the old file into the new.

There's a bug when using an file created in an older version of access with a new version of Access, even if the file does open. The most reliable fix has been to create a new file in the current version of access (even if it is in the older format) and then import everything from the old file into the new.

One of the wonderful things with MS.
Sep 17 '13 #6

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

Similar topics

4
by: Bradley Kite | last post by:
Hi all. I'm trying to diagnose/solve a problem with internet explorer, whereby sometimes the form submits, and other times IE produces an 'invalid syntax' error. First, I have a form, and...
0
by: Mara | last post by:
Hi, I have very serious problem with query in Access. I have, in my DB, a lot of forms with some buttons that I use to do query. When I press that buttons and query start I have "Invalid...
8
by: Owen Jenkins | last post by:
Hello. For years I've been using the DBEngine.CompactDatabase code to make backups of backend databases. But now I've struck a baffling problem where I get an Invalid Argument error. This...
0
by: Mark Phanides | last post by:
My ASP.NET application intermittantly (but always at same point) redirects to the 'Invalid Syntax Error' web page for some unknown reason. I've created a ASP.NET application written in VB.NET with...
9
by: Jamie | last post by:
I am receiving an Invalid ViewState error after posting back to the same page twice. Consistently the error occurs after the second postback and not after the first. I have looked into creating...
2
by: py | last post by:
Hi, I am running python 2.4.2 on win xp pro. I have the WMI module from Tim Golden (http://tgolden.sc.sabren.com/python/wmi.html). I have some code which does this... MyScript.py...
0
by: bazzer | last post by:
hey, im trying to access a microsoft access database from an ASP.NET web application in visual basic 2003.NET. i get the following error when i try running it: Server Error in...
1
by: Adam G | last post by:
Ahoy. I keep getting an "Invalid Argument" error whenever I try to Make Table query in Access. The query looks fine as a Select Query but cannot be saved nor made into a Make Table query. ...
1
by: mdhameed2007 | last post by:
hi this is hameed i have Lots of Query to Run in office 2000 Access Query and Invalid Argument Error is coming when i am run the Query plz help me to
3
by: kakarot vegeta | last post by:
There 's an invalid syntax error but i don't know what's wrong with it. the error says Invalid syntax: print variation_string import itertools variations = itertools.product('ab',...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.