Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / March 2007

Tip: Looking for answers? Try searching our database.

How to Find Data in Part of Cell

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
doyle60@aol.com - 07 Mar 2007 22:25 GMT
I have a query with a field called Fabric.  I want to create a column
in the query that returns Yes if any part of the Fabric field has the
letters "cot" in it.

So I naturally thought to put asterics around the word ("*Cot*") and
writing this:

Cot: IIf(Fabric = "*Cot*","Yes")

But it doesn't work and returns nothing for all.

How do I do this correctly?

Thanks,

Matt
bob - 07 Mar 2007 22:31 GMT
cot:iif([fabric] is like "*" & "cot" & "*","Yes", "")

Bob

>I have a query with a field called Fabric.  I want to create a column
> in the query that returns Yes if any part of the Fabric field has the
[quoted text clipped - 12 lines]
>
> Matt
doyle60@aol.com - 08 Mar 2007 14:11 GMT
Thanks Bob.  But it didn't work.  After five minutes of playing around
with it, I was able to figure out that "Like" was needed and not "Is
Like".  So this works:

    Cot: IIf([Fabric] Like "*" & "cot" & "*","Yes","")

Thanks,

Matt
fredg - 07 Mar 2007 23:32 GMT
> I have a query with a field called Fabric.  I want to create a column
> in the query that returns Yes if any part of the Fabric field has the
[quoted text clipped - 12 lines]
>
> Matt

Cot:IIf(Instr([FieldName],"Cot")>0,"Yes","No")

Signature

Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.