Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178

    Question Unanswered: show all left of "." in report

    Hi All

    I have a report that shows a part no like 123.2254
    how can i show firstly all the characters before the "." and then in another field all the characters after the "."?

    thanks in advance
    ActionAnt

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Try using the Split Function ...

    Dim SomeArray() as string

    SomeArray=Split(TextFiledHere,".", -1, vbTextCompare)

    Then ...

    BeforePeriod=SomeArray(0)
    AfterPeriod=SomeArray(1)
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Alternate suggestion:

    Code:
    Dim i As Integer
    
    i = InStr([TextField], ".")
    
    BeforePeriod = Left$([TextField], i - 1)
    AfterPeriod = Right$(TextField, Len ([TextField]) - i)
    If you're a performance monkey, I think Owen's idea may be a little more efficient.
    Last edited by Teddy; 08-16-04 at 10:35.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •