Thank you very much for your advice,  A.D Tejpal
I will download the file and have a look
Regards,
Julian

A.D.Tejpal wrote:
> *Julian,*
>  
>     You wish the query to display either of the following alternative 
> results, based upon selection made in a single combo box.
>     (a) One particular Organization (GP Practice)
>     (b) Other organizations (excluding GP Practice)
>     (c) All organizations.
>  
>     Sample query given below will get you the desired results. T_Org is 
> the name of table. CboGrp is the name of combo box on form F_Org. Row 
> source Type for CboGrp is Value List, while its Row Source is the 
> following string.
>     "GP Practice";"Others";"ALL"   
>     (The query is to be run only when the form is open.)
>  
>     Note - Whenever a query involves parameter input (whether through 
> user prompt or reference to a form's control), it is considered a highly 
> desirable practice  to incorporate a parameters clause at the beginning, 
> with explicit declaration of data-type. It becomes all the more crucial 
> in case of date type data.
>  
>     Sample db named QueryComboCriteria_2K.zip, demonstrating the above 
> approach, has been uploaded to Files section of this group.
>  
> Best wishes,
> *A.D.Tejpal*
> *--------------*
>  
> ====================================
> PARAMETERS [Forms]![F_Org]![CboGrp] Text ( 255 );
> SELECT T_Org.*  FROM T_Org
> WHERE (((IIf([Type]="GP Practice","GP 
> Practice","Others"))=[Forms]![F_Org]![CboGrp])) OR 
> ((([Forms]![F_Org]![CboGrp])="ALL")) 
> ORDER BY T_Org.Type;
> ====================================
>  
> 
>     ----- Original Message -----
>     *From:* Julian Flint <mailto:[EMAIL PROTECTED]>
>     *To:* [email protected]
>     <mailto:[email protected]>
>     *Sent:* Sunday, August 14, 2005 14:52
>     *Subject:* [AccessDevelopers] Parameters for query
> 
>     Hi All
>     This one has me pulling my hair out, not that there is much left
> 
>     I have a combo box that currently looks up to a table of
>     organisation types. This contains fields and values like
>     Org ID Type
>     1 GP Practice
>     2 Hospital
>     3 Area Health
>     4 Pharmacy
>     5 Council Office
> 
>     etc
> 
>     I want to have  combo box on a form so that a user can choose the
>     organisation type which gets passed to a query and shows the
>     contacts for a particular organisation type
> 
>     BUT
> 
>     I want to have it so that the user has 3 choices - 1: GP Practice,
>     2: Other Organisations (which encompasses all of the other
>     organisations listed above) and 3: All Organisations (which is all
>     of the organisation types)
> 
>     I have tried various combo boxes to get this to work but no luck
> 
>     Can anyone suggest how I do this please?
> 
>     TIA
> 
>     Julian F
> 
> 
> 
> 
> Please zip all files prior to uploading to Files section.
> 
> 
> ------------------------------------------------------------------------
> YAHOO! GROUPS LINKS
> 
>     *  Visit your group "AccessDevelopers
>       <http://groups.yahoo.com/group/AccessDevelopers>" on the web.
>        
>     *  To unsubscribe from this group, send an email to:
>        [EMAIL PROTECTED]
>       <mailto:[EMAIL PROTECTED]>
>        
>     *  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
> 
> 
> ------------------------------------------------------------------------
> 


------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hmfv1ps/M=362131.6882499.7825260.1510227/D=groups/S=1705115370:TM/Y=YAHOO/EXP=1124117290/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life 
- brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~-> 


Please zip all files prior to uploading to Files section. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AccessDevelopers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to