[AccessD] Bit OT - Reporting Services Question

Heenan, Lambert Lambert.Heenan at AIG.com
Tue Feb 28 08:47:11 CST 2006


Where are you running this code? What version of Access?

MS BASIC has supported While / Wend structures since way back in the 1980s
(MS Basic for CP/M).

I for one am confused!

Lambert

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darren DICK
Sent: Tuesday, February 28, 2006 8:49 AM
To: AccessD
Subject: [AccessD] Bit OT - Reporting Services Question


Hello all

In reporting services if I run the code below (from Lambert) I get the error
message...

"Wend statements are no longer supported . Use "End While" statements
instead

So If I replace wend with End while I don't get the desired result

The desired result is

From..... .C:\Program Files\Some Folder\some cool file.dll 

I want.....some cool file.dll 

But I am getting.....C:\Program Files\Some Folder

any suggestions??

Many thanks

Darren

Code Start>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Function GetPath(aPath) As String

Dim foo As Integer, aSlash As Integer

aSlash = 0

foo = InStr(aPath, "\")

While (foo > 0)

aSlash = foo

foo = InStr(aSlash + 1, aPath, "\")

end while

If aSlash > 0 Then

GetPath = Left$(aPath, aSlash)

Else

GetPath = aPath

End If

End Function

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list