473,670 Members | 2,599 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

You tried to assign the Null value to a variable that is not a variant data type

115 New Member
Hi. I'm working with a form that contain text boxes ( Invoice_num auto number, and Invoice_date bound to the table Invoice) , and a subform contains (num (and it's an auto number also) , article, size, qty, price,....)

and here is the SQL of the subform:
Code:
Expand|Select|Wrap|Line Numbers
  1. SELECT purchase.purchase_num, purchase.Invoice_num, purchase.article, purchase.size, purchase.quantity, item.Price, item.Price_after_discount, purchase.unit_price, purchase.Difference, item.st_q1, item.st_q2, item.st_q3, item.st_q4, item.st_q5, item.st_q6, item.st_q7, item.st_q8, item.st_q9, item.st_q10, [item solderie].st_q1,[item solderie].st_q2, [item solderie].st_q3, [item solderie].st_q4,        [item solderie].st_q5, [item solderie].st_q6, 
  2. [item solderie].st_q7, [item solderie].st_q8, 
  3. [item solderie].st_q9, [item solderie].st_q10, item.Stock, [item solderie].Stock, Invoice.total_cash, Invoice.total_diff, Invoice.total_discount
  4. FROM item INNER JOIN ([item solderie] INNER JOIN (Invoice INNER JOIN purchase ON Invoice.Invoice_num= purchase.Invoice_num) ON [item solderie].Article = purchase.Article) ON item.Article = purchase.Article;
But everytime that i try to add the article in the subform i got this error:
You tried to assign the Null value to a variable that is not a variant data type".
After that i press ok i can continue with the form , i insert the size and everything work fine afer that, till i want to fill the quantity , it gives me that error:
The Microsoft Office Access database engine cannot find a record in the table 'Invoice' with key matching 'Invoice_num'

but i was working on that form before , and it was working , but i needed to do some updates , and these errors pop up , but i tried to add some data on an Invoice Number that i had created before i did the update everything works fine ! and i was surprised and i don't know why i can't create a new Invoice number and how can i fix this?
Hope some one help me . thanks guys for reading this.
Aug 10 '10 #1
0 2079

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

Similar topics

1
12052
by: Yi | last post by:
Hi, I have a record set that is bound to a table in MS SQL Server. One filed in the table is bound to a "long" type member variable in the RecordSet. What will happen to the "long" variable when the field is NULL in the table? Thanks! -Yi
3
869
by: vince | last post by:
I want to assign a null value to a DateTime variable.How do i do that? Thanks Vince
4
5755
by: Hon Yuen, Ng | last post by:
Hi This is a newbie question. I've a datatable that contains null value. Sometime i need to store this data into different variables. However, error will be thrown if the data i tried to stored in the variable is a null value. E.g. Dim int As Int64 Dim null As Object
2
6235
by: Jim McGivney | last post by:
In asp 2.0 I am trying to insert a row using a detailsview control connected to an accessDataSource. I get the error message below. I am having trouble identifing which data field is causing the problem. Any suggestings are welcomed. Jim ************* You tried to assign the Null value to a variable that is not a Variant data type. Description: An unhandled exception occurred during the execution of the current web request. Please...
4
2624
by: Learner | last post by:
Hello, I have database field called 'PullAHead' defined as a bit field. Now if user doesn't pick a 'Yes' or 'No' in the front I need to be able to send a null value into the 'PullAHead' field in the database. This is how I am trying to do it.... Dim PullAhead As Integer PullAhead = Nothing If _lblpullahead.Visible = True Then
1
1501
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 = FaxMsg.Recipients.Add(0) Recip.Name = sWho
2
4894
by: bloukopkoggelmander | last post by:
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...
3
6109
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 characters into the variant type, however when I use the 6.5 database I get only the limited number of characters that are actually in the column.
4
4900
by: Greg (codepug | last post by:
Private Sub cboBody_KeyDown(KeyCode As Integer, SHIFT As Integer) 'Delete combobox entry if Del or Backspace key is hit. If (KeyCode = 46) Or (KeyCode = 8) Then Me.cboBody = "" End Sub I have used identical code in the KeyDown event of my other comboboxes to clear the box when the delete or backspace key is pressed. It works for many identical comboboxes just fine except for the cboBody combo. I have looked this over and cannot find...
9
24277
by: gggram2000 | last post by:
I need some help, cant figure out the error. SqlConnection dbConnection = new SqlConnection(xmldb); dbConnection.Open(); string sql = "SELECT InvStatus FROM SaleReceipts Where AccNum = '" + lblAccNum.Text + "' "; SqlCommand command = new SqlCommand(sql, dbConnection); SqlDataReader reader = command.ExecuteReader(); while (reader.Read()) { InvoiceStatus = reader.ToString(); }
0
8468
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8814
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8660
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7415
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6213
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5683
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4390
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2799
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2041
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.