Xy001
  Home FAQ Contact Sign in
 
Advanced search
MATCHING GROUPS



more...
POPULAR GROUPS

more...

found 4 articles for 0.302 sec
The Following should work for you Left([Code] , Instr(1,[Code] & ".",".")-1) -- John Spencer Access MVP 2002-2005, 2007 Center for Health Program Development and Management University of Maryland Baltimore County . "Leslie M" <LeslieM@discussions.microsoft.com> wrote in message news:4AE1E985-567A-4616-B5A1-6DACE85FC881@microsoft.com... >I need to write a query to help me clean up     

Group: microsoft.public.access.queries · Group Profile · Search for Xy001 in microsoft.public.access.queries
Author: John Spencer
Date: Apr 17, 2007 08:50

First use the InStr function to find the period. Then use the Left Function to trim off the period and stuff after it. Change TheField to the actual field name. NoDecimals: IIf(InStr([TheField],".") 0, Left([TheField],InStr([TheField],".")-1) , ([TheField]) As the Left function will cause an error if it can't find a period, use an IIf statement to fix only those with a period. Otherwise
Show full article (0.76Kb) · Show article thread
But didn't you give an example that has NO period in it? One way to approach this would be to use an IIF() statement that checks for a ".", perhaps something like: NewField: IIF(InStr([YourCode],".")>0,Left([YourCode],InStr([YourCode],".")-1),[YourCode]) Put this as a new field in a query that includes the table in which this field is found. Actual syntax may vary. Regards     

Group: microsoft.public.access.queries · Group Profile · Search for Xy001 in microsoft.public.access.queries
Author: Jerry Whittle
Date: Apr 17, 2007 07:52

Show full article (0.97Kb) · Show article thread
    

Group: microsoft.public.access.queries · Group Profile · Search for Xy001 in microsoft.public.access.queries
Author: Jeff Boyce
Date: Apr 17, 2007 07:44

Show full article (0.97Kb) · Show article thread
    

Group: microsoft.public.access.queries · Group Profile · Search for Xy001 in microsoft.public.access.queries
Author: Leslie M
Date: Apr 17, 2007 07:38

Show full article (0.38Kb)