[AccessD] Separate selected records from a table

Kostas Konstantinidis kost36 at otenet.gr
Mon Jun 6 01:54:19 CDT 2005


Hi Bruce,
thank's for your quickly response
the 1st of my questions was really solved with your help

/kostas


----- Original Message ----- 
From: "Bruen, Bruce" <Bruce.Bruen at railcorp.nsw.gov.au>
To: "Access Developers discussion and problem solving" 
<accessd at databaseadvisors.com>
Sent: Monday, June 06, 2005 9:28 AM
Subject: RE: [AccessD] Separate selected records from a table


> Try
>
> IIf(InStr(1,[names],",")<>0,Trim(Right$([names],Len([names])-InStr(1,[na
> mes],","))),Null)
>
> (replacing "names" with "director")
>
> N.B This is probably not optimal, I just juggled yours to make it work.
>
>
> Here's a sample:
> Input names returned value
> ahab <<null>>
> bhab, chab chab
> dhab,ehab ehab
> fhab, ghab ihab ghab ihab
> jhab khab,lhab mhab lhab mhab
> ohab phab, qhab qhab
> rhab, <<null>>
>
> Hth
> Bruce Bruen
>
> P.s. hello guys - long time no see!
>
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kostas
> Konstantinidis
> Sent: Monday, 6 June 2005 4:13 PM
> To: Access Developers discussion and problem solving
> Subject: [AccessD] Separate selected records from a table
>
> Hi again :)
> in a table there are names and in some cases there are two names with a
> ","
> between them
> What I want to do is to separate only the records keeping the second
> name.
>
> I tried the follown
> 1st: Right$([director];Len([director])-InStr(1;[director];","))
> 2nd: Left$([director];InStr(1;[director];",")-1)
>
> but it returns with 2 problems
> 1. in 2nd (Left$) #ERROR for the blank records 2. in 1st (Right$) a
> space " " in the begginning of the separated records
>
> thank's
> /kostas
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>
> This e-mail and any attachments may contain confidential information that 
> is intended solely for the use of the intended recipient and may be 
> subject to copyright. If you receive this e-mail in error, please notify 
> the sender immediately and delete the e-mail and its attachments from your 
> system.  You must not disclose, copy or use any part of this e-mail if you 
> are not the intended recipient.  Any opinion expressed in this e-mail and 
> any attachments is not an opinion of RailCorp unless stated or apparent 
> from its content. RailCorp is not responsible for any unauthorised 
> alterations to this e-mail or any attachments. RailCorp will not incur any 
> liability resulting directly or indirectly as a result of the recipient 
> accessing any of the attached files that may contain a virus.
> -- 
> 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