PC Review


Reply
Thread Tools Rate Thread

Diplay info depending on multiple criteria

 
 
Schon
Guest
Posts: n/a
 
      21st Dec 2009
I am trying to display a field in a query based on multiple criteria. I have
one field defined this way:

Group: IIf([Alternate Group]="Carbox","02 Carbox","01 Patient Supplies")

I then want this field to calculate next

Group Description:If ([SaleType]="R","05 Rental",[Group Description]

It works with this exception. I want to sort the Group Description
Ascending so that the 01 is first, 02 second, and 05 last.
It asks me to 'Enter Parameter Value' for Group when I run the query.
I think if I make it a Make Table Query without sorting I can then create
another query pulling that table in which I can sort but am hoping to do it
all in this query.

Thanks in advance..
 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      22nd Dec 2009
The issue is that you've got Group Description as the alias plus you're
referring to it in the expression.

Assuming Group Description is a field in your table, change that to

Group Description:If ([SaleType]="R","05 Rental",[TableName].[Group
Description])


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Schon" <(E-Mail Removed)> wrote in message
news:89EB4916-DB91-4FAF-981A-(E-Mail Removed)...
>I am trying to display a field in a query based on multiple criteria. I
>have
> one field defined this way:
>
> Group: IIf([Alternate Group]="Carbox","02 Carbox","01 Patient Supplies")
>
> I then want this field to calculate next
>
> Group Description:If ([SaleType]="R","05 Rental",[Group Description]
>
> It works with this exception. I want to sort the Group Description
> Ascending so that the 01 is first, 02 second, and 05 last.
> It asks me to 'Enter Parameter Value' for Group when I run the query.
> I think if I make it a Make Table Query without sorting I can then create
> another query pulling that table in which I can sort but am hoping to do
> it
> all in this query.
>
> Thanks in advance..



 
Reply With Quote
 
Schon
Guest
Posts: n/a
 
      30th Dec 2009
I apologize but I put the wrong value. It doesnt refer to itself, it refers
to another field in the SAME QUERY. This is what I have..

Group: IIf([Alternate Group]="Carbox","02 Carbox","01 Patient Supplies")

I then want this field to calculate next in the same query

Group Description:If ([SaleType]="R","05 Rental",[Group]

"Douglas J. Steele" wrote:

> The issue is that you've got Group Description as the alias plus you're
> referring to it in the expression.
>
> Assuming Group Description is a field in your table, change that to
>
> Group Description:If ([SaleType]="R","05 Rental",[TableName].[Group
> Description])
>
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "Schon" <(E-Mail Removed)> wrote in message
> news:89EB4916-DB91-4FAF-981A-(E-Mail Removed)...
> >I am trying to display a field in a query based on multiple criteria. I
> >have
> > one field defined this way:
> >
> > Group: IIf([Alternate Group]="Carbox","02 Carbox","01 Patient Supplies")
> >
> > I then want this field to calculate next
> >
> > Group Description:If ([SaleType]="R","05 Rental",[Group Description]
> >
> > It works with this exception. I want to sort the Group Description
> > Ascending so that the 01 is first, 02 second, and 05 last.
> > It asks me to 'Enter Parameter Value' for Group when I run the query.
> > I think if I make it a Make Table Query without sorting I can then create
> > another query pulling that table in which I can sort but am hoping to do
> > it
> > all in this query.
> >
> > Thanks in advance..

>
>
> .
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Drop down to diplay info from another sheet =?Utf-8?B?ZGViaW5uag==?= Microsoft Excel Worksheet Functions 4 11th Oct 2005 03:06 AM
After attendees respond to meeting request, names diplay multiple =?Utf-8?B?SmVmZg==?= Microsoft Outlook Calendar 3 1st Mar 2005 06:37 PM
After attendees respond to meeting request, names diplay multiple =?Utf-8?B?SmVmZg==?= Microsoft Outlook Calendar 0 3rd Nov 2004 11:58 PM
form info that sends you to a page depending on the info inserted? =?Utf-8?B?amltMTEwOQ==?= Microsoft Frontpage 1 8th Oct 2004 11:50 PM
Multiple Diplay card query CJ Windows XP Video 1 22nd Mar 2004 07:44 PM


Features
 

Advertising
 

Newsgroups
 


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