Results 1 to 4 of 4

Thread: VBA Query

  1. #1
    Join Date
    Feb 2009
    Posts
    35

    Unanswered: VBA Query

    Hi, I am looking for a piece of code that will allow me to carry out the following query. Sample data is below:

    CPNTCS…………..
    LIN012N 123445464748
    LIN013N 01050617
    CPNLPL……..
    LIN012N 01020304050607
    LIN023N 1213141516
    LIN034N 121314
    LIN044N 1213

    This data represents an output file with coupons (CPNTCS & CPNLPL) with their relevant line information attached. Now what I need is a function to allow me to retrieve LIN’s with just 2 selections eor example:
    LIN044N 1213
    Or LIN’s with 3 selections :
    LIN034N 121314 and so on.
    The only way I can think to do this is to write a query that says :

    If Left(strInLine, 6) = "LIN012N" AND Mid(strInLine, 8) = “IsNumeric”
    I am uncertain how to write “isnumeric” talking in general as apposed to having set criteria i.e. 1234 etc.

    I am assuming this is fairly simple.

    Thanks

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Try: AND IsNumeric(<Expression>)
    Have a nice day!

  3. #3
    Join Date
    Feb 2009
    Posts
    35
    sorry for late reply, this has worked a treat.

    Regards

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You're welcome!
    Have a nice day!

Posting Permissions

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