Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Wildcard Filtering on ADO Recordset

So, in my case the mappings with question marks all started with 8 so I just had to build in some logic and do some combo filtering. Kind of a pain and probably not the most effecient but it worked.

Here is what I did.

Was:
lsfilter = "JDEAcct like '" & lsSymbol & "'"
mrsData.Filter = lsfilter

Changed to:

If Left(lsSymbol, 1) = "8" Then
If Right(lsSymbol, 1) = "*" Then
lsfilter = "JDEAcct like '*" & Mid(lsSymbol, 4, Len(lsSymbol) - 3) & "' AND JDEACCT like '8*'"
Else
lsfilter = "JDEAcct like '*" & Mid(lsSymbol, 4, Len(lsSymbol) - 3) & "*' AND JDEACCT like '8*'"
End If
Else
lsfilter = "JDEAcct like '" & lsSymbol & "'"
End If


mrsData.Filter = lsfilter
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot use recordset twice with copy From recordset JasonC Excel Programming 1 February 3rd 10 11:53 PM
ADO Recordset Tim Excel Programming 0 March 9th 09 04:03 PM
trouble filtering a list. Why isn't column filtering? Pat Excel Worksheet Functions 1 July 18th 05 03:30 PM
Type recordset/recordset? FlaviusFlav[_9_] Excel Programming 4 May 24th 04 12:16 PM
Recordset Stephan Kassanke Excel Programming 0 September 10th 03 04:45 PM


All times are GMT +1. The time now is 02:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"