[AccessD] Use form field for IN statement in Where clause

O'Connor, Patricia (OTDA) Patricia.O'Connor at otda.state.ny.us
Tue Dec 6 09:08:07 CST 2005


Hi Gustav

Thank you - I was adding redesign to the upgrade anyway - will add this
too. I may add a bridge table to the design.  Though the instr with true
does work in current query.

Thanks

******************************************************************
*Patricia O'Connor
*Associate Computer Programmer Analyst
*OTDA - BDMA
*(W) mailto:Patricia.O'Connor at otda.state.ny.us
*(w) mailto:aa1160 at otda.state.ny.us
******************************************************************
 

> 
--------------------------------------------------------
This e-mail, including any attachments, may be confidential, privileged or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy or otherwise use this e-mail or its attachments.  Please notify the sender immediately by reply e-mail and delete the e-mail from your system. 


-----Original Message-----

> From: accessd-bounces at databaseadvisors.com 
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of 
> Gustav Brock
> Sent: Tuesday, December 06, 2005 05:10 AM
> To: accessd at databaseadvisors.com
> Subject: Re: [AccessD] Use form field for IN statement in Where clause
> 
> Hi Patricia
> 
> Though it would be nice, you can't do this. Look up my post dated:
>   2005-11-21 09:55
> 
> subject:
>   SQL - IN Operator - Possible to use parameter
> 
> /gustav
> 
> >>> Patricia.O'Connor at otda.state.ny.us 05-12-2005 20:14 >>>
> In an Access 97 database 
> 
> I have a case type field in a reference table that may 
> contain 1 to 11 values depending on what cases are used in a 
> particular report 
>    examples  report 1221 has this type  11
>              report 1321 has these types 11,12,14,16,17
> 
> 
> The field is placed into a hidden text field on a form called 
> [Forms]![FrmBicMoSel]![txtSelCriteria] 
> 
> The called query currently uses this field in the where 
> statement this way
>  
> (InStr([Forms]![FrmBicMoSel]![txtSelCriteria],[tlkpXrefDescID]
> .[CaseType
> ])>0)) 
> 
> I would like to be able to use it with an IN statement 
> [tlkpXrefDescID].[CaseType] in([Forms]![FrmBicMoSel]![txtSelCriteria])
> 
> But it does not like this - how can I get this to work - I 
> think there is a function but I can't seem to remember it right now. 
> 
> 
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>



More information about the AccessD mailing list