-
Find "-n-t" in a string and skip it!
Hi, I am dumping some stuff from AD, and would like to skip some records if their value contains "-n-t".
The line below gives a string value...
objRecordSet.Fields("cn").Value
I want to say something like:
If objRecordSet.Fields("cn").Value contains "-n-t" then
objRecordSet.MoveNext
Just not sure how to get to "-n-t"... Records are of variable length so left, mid or right wont work!
Thx a lot
Mike
-
Mike
Couldn't you just use that in criteria for the recordset?
-
Not really
Because I am dumping a cn attribute from Active Directory... it just gets all the values....
-
Any suggestions please???
-
Mike
Take a look at Instr or Like.
[vba]
If Instr(objRecordSet.Fields("cn").Value, "-n-t" Then objRecordSet.MoveNext[/vba]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules