Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

yes no field

Forum home » Delegate support and help forum » Microsoft Access Training and help » Yes / No Field on Query

Yes / No Field on Query

ResolvedVersion 2003

Lisa has attended:
Excel VBA Intro Intermediate course

Yes / No Field on Query

When you have a Yes/No field in a table and you make a query from the data - how do you only have the "yes" ones show up?

Edited on Mon 21 Jul 2008, 16:49

RE: Yes / No Field on Query

Hi Lisa,

Thank you for your post;

In a Form or Report consider the following, if for example you have the following fields: Taxable, Item Cost, Item quantity where Taxable is your yes/no field.

In the Detail section of the form I would create a textbox with the formula: IIf([Taxable]=-1,([Item_Cost]*[Quantity])*0,0) (note the change to -1 from 1) and call it say TaxableAmount.

-1 is a yes in an Access Database and 0 is a no.

Try that it should work, if not please come back, regards Pete

RE: Yes / No Field on Query

Hi,

not sure i got that - so thought it better to give you my example?
I have a item which is either active or not (hence the yes no tick)
when a report is run how do i just get the "active ones" to be shown?

Thanks Pete

RE: Yes / No Field on Query

Hi Lisa

Thank you for your question

You simply need to enter yes into the criteria field of your query designer, under the relevant column.

Alternatively, you can enter -1 or 0.

Regards


Stephen

RE: Yes / No Field on Query

Thank you sooooo much...
:-)

Access tip:

Change case

To change case from upper or lower case, highlight the text area, hold down the Shift key and pres F3

View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.