populating a combo box

yessir

Saved By Grace
Local time
Today, 09:13
Joined
May 29, 2003
Messages
349
A box without hinges, key, or lid, Yet golden treasure inside is hid. says:

i need to make this statement NOT include "" strings, and only include all possible outcomes once

SELECT tblRC.Title FROM tblRC ORDER BY tblRC.Title;

thus

if book appears 2x in table it appears

:confused:
 
SELECT DISTINCT tblRC.Title
FROM tblRC
WHERE Not (tblRC.Title) Is Null And (tblRC.Title)<>"" ORDER By tblRC.Title
 
thanks

got it by then though...

just took a LITTLE thought..

lol

but if i am populating a combobox then can i still search like this?

and how can i make this statement work?

If Not IsNull(Me![Title]) Then
where = where & " AND [Title] Like '*" & Me![Title] & "*'"
End If

If Not IsNull(Me![Type]) Then
where = where & " AND [Type] Like '*" & Me![Type] & "*'"
End If
 
The SQL string goes into the Recordsource property of the combo, so the combowill contain only the records defined by the SQL.

Your other expressions are just wrong and won't work. You are attempting to use the wild card symbol to get all non-null entries. What context is this in? What will you do with this data?

You could use a saved query as the basis for your combo, using NOT is Null in the criteria row for both Type and Title. If both Type and Title are required, put the criteria on the same line (AND), if either will do, put them on different lines (OR).

This, I think, is the best solution to your problem.
 

Users who are viewing this thread

Back
Top Bottom