473,320 Members | 1,719 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,320 software developers and data experts.

Variant data type error

Hi all

I am getting the following error and it is driving me insane. I just cannot find a fix for it. :

You tried to assign the NULL value to a variable that is not a Variant data type.

Now I have a main form linked to a as400 table. This has a subform on it, also linked to a AS400 table. Now the foirst control on the subform( also the first field a user needs to complete on the form) is the one I am trying to popullate. The minute I try to enter any data into this control is when I get the above error. I click ok on it, am allowed to carry on the completion of the data I want to type in there and when I move onto the next control , the data is written to the linked table, but then after entering text on the second control(which is also on the subform) and I move on to the third ( which is a control on the main form) I recieve an error that the ODBC link has failed.

Any ideas why I get this Variant error anyone? I am not using any variables with the subform or the main form.
Jul 13 '07 #1
2 4873
ADezii
8,834 Expert 8TB
Hi all

I am getting the following error and it is driving me insane. I just cannot find a fix for it. :

You tried to assign the NULL value to a variable that is not a Variant data type.

Now I have a main form linked to a as400 table. This has a subform on it, also linked to a AS400 table. Now the foirst control on the subform( also the first field a user needs to complete on the form) is the one I am trying to popullate. The minute I try to enter any data into this control is when I get the above error. I click ok on it, am allowed to carry on the completion of the data I want to type in there and when I move onto the next control , the data is written to the linked table, but then after entering text on the second control(which is also on the subform) and I move on to the third ( which is a control on the main form) I recieve an error that the ODBC link has failed.

Any ideas why I get this Variant error anyone? I am not using any variables with the subform or the main form.
On this 1st Field in the Sub-Form, do you have any code in the Enter(), Change(), Click(), GotFocus(), etc. Events?
Jul 13 '07 #2
Howzit ADEZii

Thanks for a super quick reply. Nope, No code what so ever on any event, which is why I can't understand why it is referring to a variable.
Jul 13 '07 #3

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

Similar topics

5
by: Matt Smith | last post by:
Hi, all. Just a quick question, when setting a COM process to read a value from a pre-defined register index, I think, I have to change the variable that the value will be returned to (as I have...
1
by: C. N. Sridhar | last post by:
Hi, I'm writing a wrapper to a win32 dll in C#. I need to call a method in DLL which has a Variant type reference parameter. How to marshal variant type from win32 (unmanaged code) to C#...
8
by: MLH | last post by:
If I choose to dim MyDate as Date or MyDate as Variant, what is the most significant difference between the two choices?
19
by: Jon Davis | last post by:
Hi guys! Just wanted to let you all know that I created a Variant structure, inspired by the old VB6 days. This is written in C#, but you can build a CLR/.NET class library assembly and reference...
7
by: Tracks | last post by:
I have old legacy code from vb5 where data was written to a file with a variant declaration (this was actually a coding error?)... in vb5 the code was: Dim thisdata as integer Dim thatdata...
3
by: G Gerard | last post by:
Hello If Variant type is the data type that contains any kind of data type is there a reason why one would not always use Variant when declaring variables? Thanks G Gerard
1
by: darrenbenn | last post by:
I need to convert this code to VB .NET (2003). Dim FaxMsg As IFaxMessage Set FaxMsg = gFC.NewMessage Dim Recip As Variant ' add a recipient to the fax recipients collection Set Recip =...
4
by: buzzluck68 | last post by:
Hello, I am having trouble upgrading my VB apps to .net. When i started at my company there was a dll created here in vb6, and i need to use that dll for many functions that would take too much...
3
by: empire5 | last post by:
I'm trying to convert a MS-Sql 6.5 VB application to SQL 2005 and vb.net. The vb app has uses a variant data type. When I try to read the variant data type from the sql 2005 database I get 8,000...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.