PDA

View Full Version : Solved: omitt from select query



Trevor
03-12-2008, 08:22 PM
I have this select query :

SELECT DISTINCT ReferredToLU.ReferredTo FROM ReferredToLU ORDER BY ReferredToLU.ReferredTo;

I would like to do two thing but not sure if they are possable or how to do them
1) using this query I would like to omitt the value "N/A" (w/o quotes)

2 ) omit "N/A"(w/o quotes) and omite a persons name in a value in column [Referred to] where colume[status] does not equal "lead" (w/o quotes)

The reason, I have 3 tables with basicly the same info in them (all three are lookup tables)
thanks for help. FYI the query is placed in combo box. rowsouce.

OTWarrior
03-14-2008, 08:16 AM
use:
Not "N/A"

in the criteria for the field.

that should get you started.

Here is sample SQL code for a query:

SELECT tbl_Names.txtFirstName, tbl_Names.txtSurname
FROM tbl_Names
WHERE ((Not ( tbl_Names.txtFirstName)="N/A"));

Trevor
03-14-2008, 12:23 PM
thanx I got it this morning but alittle diierent syntax on where:
[code\] vba

WHERE (([referredto] <> "N/A"));