A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Subject: Need help on Iff Statement



 
 
Thread Tools Display Modes
  #1  
Old September 26th, 2009, 08:07 PM posted to microsoft.public.access.queries
Aamer
external usenet poster
 
Posts: 53
Default Subject: Need help on Iff Statement

I want to use IFF statement in a querry but so far am unable to figure out
how to do it.
If someone could guide me I will be greatful.

following are the fields in a table / querry

Trans Id - Customer Name - Description - Qty - Price - Entry Type

The value for Entry Type has 3 options - Sales, Purchase, Returnable Item

If in an entry the value for Entry Type is Returnable Item, then other
entrys must show skipping the Returnable Entry

I tried using the following statement in a querry but it does not work

=IIf([Entry Type]="Returnable Item", "Returnable item", is null)


please Help me fix this problem


Regards

  #2  
Old September 26th, 2009, 08:54 PM posted to microsoft.public.access.queries
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Subject: Need help on Iff Statement

If you don't want to display the returnable items, then set the criteria from
the record source to not display them. If you just want to hide the Type then
try:

=IIf([Entry Type]="Returnable Item", Null, [Entry Type])

If that doesn't work, come back with some sample records and how they should
display.

--
Duane Hookom
Microsoft Access MVP


"Aamer" wrote:

I want to use IFF statement in a querry but so far am unable to figure out
how to do it.
If someone could guide me I will be greatful.

following are the fields in a table / querry

Trans Id - Customer Name - Description - Qty - Price - Entry Type

The value for Entry Type has 3 options - Sales, Purchase, Returnable Item

If in an entry the value for Entry Type is Returnable Item, then other
entrys must show skipping the Returnable Entry

I tried using the following statement in a querry but it does not work

=IIf([Entry Type]="Returnable Item", "Returnable item", is null)


please Help me fix this problem


Regards

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.