473,698 Members | 2,972 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Check for null entry in combo box

Jim
I am trying to use a combo box in order to write a query on the fly. I
want to check for a null entry so i can replace it with "Like *" or
similar.

If Combo0.Value = Null Then MsgBox ("null")

this however doesnt seem to work... even when there is no value set the
msgbox doesnt appears

any help much appreciated...
thanks

jim
Oct 22 '06 #1
3 10692
"Jim" <ji*@nospam.com schreef in bericht
news:12******** *****@corp.supe rnews.com...
>I am trying to use a combo box in order to write a query on the fly. I want
to check for a null entry so i can replace it with "Like *" or similar.

If Combo0.Value = Null Then MsgBox ("null")

this however doesnt seem to work... even when there is no value set the
msgbox doesnt appears

any help much appreciated...
Try:

If IsNull(Combo0) Then
MsgBox ("null")
End If

john
Oct 22 '06 #2
Jim
thanks, john, you are a scholar!

john wrote:
"Jim" <ji*@nospam.com schreef in bericht
news:12******** *****@corp.supe rnews.com...
>I am trying to use a combo box in order to write a query on the fly. I want
to check for a null entry so i can replace it with "Like *" or similar.

If Combo0.Value = Null Then MsgBox ("null")

this however doesnt seem to work... even when there is no value set the
msgbox doesnt appears

any help much appreciated...

Try:

If IsNull(Combo0) Then
MsgBox ("null")
End If

john

Oct 22 '06 #3
"Jim" <ji*@nospam.com schreef in bericht
news:12******** *****@corp.supe rnews.com...
thanks, john, you are a scholar!
Hm, not really, just happened to have asked the same question a few weeks
ago ;-)
john
Oct 22 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1660
by: MLH | last post by:
I have tblVehicles and tblOwners. The former has a field that is link to a unique owner in tblOwners. Trouble is, not every vehicle can be identified with an owner. So I want to be able to leave the field emtpy (Null) in tblVehicles from time to time. I'm unable to do this because of the relationships defined. I have a one-to-many link on that field. One one owner in tblOwners can have many related vehicles in tblVehicles. I have...
1
2561
tolkienarda
by: tolkienarda | last post by:
hi all i need to check in a database to see if a value is null i don't remember what i put in for null mysql_query("SELECT name FROM dbase WHERE fcc != NULL"); my question is the part where it is fcc != NULL correct of do i put a 0 or '' instead of null thanks
1
1617
by: questionit | last post by:
How to create and display check-boxes as values in a Combo-Box ? Thanks
4
5088
by: RP | last post by:
I have a member variable of a class of type "int", and while assigning value to it in a constructor, I want to check whether it is a null. I am using following code: if (NewMember.BPLNo == null) NewMember.BPLNo = 0; But, Visual Studio 2005 is giving warning that variables with type 'int' cannot be 'null'. How to check this?
16
3885
chandru8
by: chandru8 | last post by:
hi to all i am using vb6.0 is there any way to check more textboxes value is null or not because in my form iam having 50 text boxes all should not be null if (text1.text) <> "" and text2.text <> "" ..............then end if is there any better way than this
0
956
by: ricardovillarroel | last post by:
i am trying to check the text box for nulls once the user tabs over the text box. i do not want it to check for nulls when i click on okay. here is code. do i need to setfocus so it will go back to the text box? Private Sub txtArrivalDate_AfterUpdate() Dim ArrivalDate As Date ArrivalDate = txtArrivalDate.Value If IsNull(ArrivalDate) Then MsgBox ("Please enter a valid date.")
4
4017
rsrinivasan
by: rsrinivasan | last post by:
Hi all, I have one table with 24 fields in SQL server. In this some of the fields has NULL value. But i want to get the records which does not have any NULL value in any one of the fields. This is my Query: select * from tablename where v1 is not null and v2 is not null and v3 is not null and v4 is not null and v5 is not null and v6 is not null and
1
2851
by: katanah | last post by:
I am using Access, 2003. I have an entry form (single form) with a date field. I would like the user to be able to enter: 115 08 and have Access store and display the date as: 11/05/08, even though the zero was not entered. I am familiar with customizing formats and input masks, but cannot find any hint in the help section of how to achieve this. Is it possible? Maybe using VB (I am a novice at VB)? Thanks
0
1122
by: vb6 student | last post by:
My combobox in vb6 is to reterievr values from access database on form load event. But it gives this error of " invalid use of null "despite of so many values present in database of that particular field asked I am copying my code............some expert kindly help me Dim cn As New ADODB.Connection Dim rs As New ADODB.Recordset Private Sub Form_Activate() cn.ConnectionString = "provider=microsoft.jet.oledb.4.0;" & " data source=" &...
0
8683
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
8611
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9170
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9031
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
7741
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...
0
5867
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
4372
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4624
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
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

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.