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

Empty dropdown list when “Null” value appears in the table

15
Hello,

There are the following tables (one-many relationship):

tblMeasuredSignals
ID_MeasSignal (PK)
(…other fields…)
intSignalID

tblSignalIDs
intSignalID (PK)

User assigns a number to a measured signal from a dropdown list (i.e. a cable connection must be made to measure a signal therefore each wire must have a unique ID). The idea is to hide these values from the dropdown list, which have already been assigned. This works fine using the following SQL statement:

Expand|Select|Wrap|Line Numbers
  1. SELECT tblSignalIDs.intSignalID
  2. FROM tblSignalIDs
  3. WHERE (((tblSignalIDs.intSignalID) Not In (SELECT tblMeasuredSignals.intSignalID FROM tblMeasuredSignals)))
  4. ORDER BY tblSignalIDs.intSignalID;
PROBLEM:
Some signals can be measured using software (no cable needed => no ID for a cable needed => only signal description appears on the list and ID=null).
In case at least one “Null” value appears in [tblMeasurement].[intSignalID] then combobox using the above SQL statement is blank.

QUSTION:
Why does this happen and how can it be avoided?
Attached Images
File Type: jpg dropdownNOK.jpg (42.9 KB, 154 views)
File Type: jpg dropdownOK.jpg (40.5 KB, 130 views)
Jun 18 '15 #1
1 1032
jforbes
1,107 Expert 1GB
I'm not sure what's going on here, but if you are sure that it's a Null value that is messing things up, you can exclude them from the Select:
Expand|Select|Wrap|Line Numbers
  1. WHERE (((tblSignalIDs.intSignalID) Not In (SELECT tblMeasuredSignals.intSignalID FROM tblMeasuredSignals WHERE NOT tblMeasuredSignals.intSignalID IS NULL)))
Jun 18 '15 #2

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

Similar topics

1
by: Kerri | last post by:
Hi, I have an aspx page with a drop down. This is a page where a user can edit their user profile. When they go to this page, I want the dropdownlists to default to what it is in teh user...
2
by: JIM.H. | last post by:
I am populating dropdown list with binding dataset, and dropdown list shows first item by default when application is launched, is there any way I can set it be empty and let user select one?
3
by: TD | last post by:
I have an unbound form that adds and updates records to one table. I use an INSERT sql statment to add a new record and a UPDATE statement to update a record. I created a function named C2F to...
5
by: =?Utf-8?B?QnJlbmRlbiBCaXhsZXI=?= | last post by:
Hello. I am reading a value from a table and trying to determine if that value exists in a list of values associated with a dropdownlist. If so, I select the value, otherwise, I don't. I haven't...
4
rajiv07
by: rajiv07 | last post by:
Hi to all I want to know How to update null value in table. Is any idea please. Thanks Regards RajivGandhi
5
by: abhi3211 | last post by:
i am using java inside java script page. in that page i want to use two dropdown list. in first dropdown list i am getting data from ms-access database. in second dropdown list i want to get data...
4
by: nstalkol | last post by:
Im a rookie. I have am unbound combo box populated with values (rowsource) from a query which has 2 tables in it. Each table has its own ID, but both are included in the combo box (info3)....
3
by: rachna gandhi | last post by:
i have use this code when i select state city is automatically filled in 2nd dropdown according to the value of 1st dropdown.but it is not working. protected void...
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...
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
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:
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...

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.