Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Null Values in Combo 2

Status
Not open for further replies.

SeadnaS

Programmer
May 30, 2011
214
Need a way to stop my combobox from displaying null values.
 
change record source of combobox to a select statement:

Select * from yoursource where displayvalue is not null;

Yoursource being the name of the table or query
Displayvalue being the field you want to not display null values
 
Oh wait. Not working. Got a popup box with "Getting enter parameter value display value".
 
Are you able to run the record source as a standalone query, or does it too give an error message?


Is the actual source of the data from a table or a query. If a query is it possible to provide the record source of both the combobox and the query?
 
stop my combobox from displaying null values
What is the SQL code of your combo's RowSource ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
SELECT DISTINCT T_MASTER.Class FROM T_MASTER;
 
When i add "where displayvalue is not null" thats when i get the problem.
 
SELECT DISTINCT Class FROM T_MASTER WHERE Class IS NOT NULL

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
SELECT DISTINCT T_MASTER.Class FROM T_MASTER where Class is not null;

I tried that, its does not give me an error message but it still shows empty values.
 
Code:
SELECT DISTINCT Class FROM T_MASTER WHERE Trim(Class & '')<>''

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Syntax error
Copy'n'paste YOUR SQL code.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
SELECT DISTINCT Class FROM T_MASTER WHERE Trim(Class & '')<>''

thats the code u gave me.
 
And this ?
Code:
SELECT DISTINCT T_MASTER.Class FROM T_MASTER WHERE Trim(T_MASTER.Class & "")<>""

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top