Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Split up and analyze data within single field

Status
Not open for further replies.

antiskeptic

Programmer
Jul 14, 2004
71
US
Hopefully this is a quick question....

The field I need to analyze has data that looks similar
to this:

Accounting\NSF\2000 Logs\Jan

Basically, as you can probably guess, this is
a folder path. And I need to isolate the individual folders. What I am trying to do, is group another field (the user's name) by the "common denominator" folder.

FOr example:
Accounting\ JDoe Owner
Accounting\NSF\ JDoe Owner
Accounting\NSF\2000 Logs\ JDoe Owner
Accounting\NSF\2000 Logs\Jan JDoe Owner
Accounting\NSF\2000 Logs\Feb JDoe Owner
Accounting\NSF\2000 Logs\Mar JDoe Owner

All I care about seeing, in my finished query, is the top line...because we know that JDoe owns the topmost folder, so he obviously owns all folders inside it. ( This is not exactly true in the real world...but it's good enough to get my point across, I think. :) ) I hope this makes sense...and if not please post any questions that will help you to help me. :)

Thank you in advance for any help ayone can provide.

Sincerely,
Antiskeptic
 
Probably somthing like this will work.
Check out the Split-Function for details.

Dim vVar As Variant
Dim sPath As String
Dim sResult As String

sPath = "YourFullPath"
vVar = Split(sPath, "\")
sResult = vVar(0)


Regards, Georges
 
This is probably a really stupid question, but What is "Split"? It's an undefined function in Access. I am using Access 2000

Thanks, Antiskeptic
 
How are ya antiskeptic . . . . .

Open any code window, hit F1 to call up help. Then on the [blue]Index Tab[/blue] type [blue]Split[/blue] and read all about it!. Any questions we'll be here . . . .

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top