Welcome to WebmasterWorld Guest from 22.214.171.124
Forum Moderators: ocean10000
My select statement is:
Set RS = DB.Execute("SELECT * FROM registrants WHERE share_info <> 'No' ORDER BY last_name ASC")
I've changed it to check a value in another field and it works fine. But no matter what I do with the SHARE_INFO field I get no records returned.
Thanks for any help.
Take a look at what some of the actual values of that SHARE_INFO field look like. If you set the db field to be an Access Yes/No box, it might be populated with Y or N instead of Yes and No.
I don't know your database design though so I can only guess.
SELECT * FROM registrants WHERE share_info = 'No'
share_info <> 'No' means where field value is NOT 'No'.
Otherwise, best way to check your sql is copy and paste it into a new query in the Access db to check it. HTH
@kevinj: I'd use the whole statement as I posted it. Depending on the DBMS and the front end (where a user can change a 'No' to an empty value or an emtpy string), the value could end up being '' and not NULL.