By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,977 Members | 1,643 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,977 IT Pros & Developers. It's quick & easy.

Only show Employees that are active?

P: 3
I have an employees table with a field called Status. It is a text field: Active or Inactive. Without changing it to a yes/no; is there a way to code so that if it says Inactive, that employee will not show up in any dropdown combo boxes??


Apr 10 '08 #1
Share this Question
Share on Google+
3 Replies

Expert 2.5K+
P: 3,532
Create a query based on your table, and in the Criteria box for your Status field, enter "active" (with the double quotation marks) then create your combobox based on this query.

Welcome to bytes!

Linq ;0)>
Apr 10 '08 #2

P: 68
I agree with MisingLinq
Apr 10 '08 #3

Expert Mod 15k+
P: 31,769
Principally the same as Linq but I would use single-quotes within your SQL (See Quotes (') and Double-Quotes (") - Where and When to use them).
Expand|Select|Wrap|Line Numbers
  1. ...
  2. WHERE [Status]='Inactive'
  3. ...
Apr 11 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.