SQL statement for a Combobox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Beany
    New Member
    • Nov 2006
    • 173

    #1

    SQL statement for a Combobox

    I have a combobox that has a list of sites.......... ...

    selecting a site brings up all the site details in a form........... .......

    there are several fields within that form including a status field.

    The status field includes live, cancelled, pending .

    What i want to do is, if any site has a status of cancelled , it shouldnt list it in the combobox....... ........how do i do this?

    ive tried the following SQL statement...... .... it doesnt work

    Code:
    SELECT [tab_data].[site] FROM tab_data WHERE status != cancelled  ORDER BY [site];
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32669

    #2
    Try :
    Code:
    SELECT [Site] FROM [tab_data] WHERE UCase([Status])<>'CANCELLED' ORDER BY [Site]

    Comment

    • Beany
      New Member
      • Nov 2006
      • 173

      #3
      Thanks Neo,

      that works.........

      Comment

      Working...