If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Visual Basic > VBA Access query

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-28-10, 11:27
st3ven_J st3ven_J is offline
Registered User
 
Join Date: Feb 2009
Posts: 35
VBA Access 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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On