William Hindman
wdhindman at dejpolsystems.com
Thu Mar 18 12:41:39 CDT 2010
there you go :) William -------------------------------------------------- From: "Max Wanadoo" <max.wanadoo at gmail.com> Sent: Thursday, March 18, 2010 1:20 PM To: "'Access Developers discussion and problem solving'" <accessd at databaseadvisors.com> Subject: Re: [AccessD] CurrentProject.Path syntax? > > You mean EVERY condition. All ONE of them...gee, some overhead. > > As opposed to if..then...else...endif > > Now, if you had of used my code in your problem, you wouldn't have had to > post it, now would you? > > Mypath = currentproject.path & IIf(Right(currentproject.path, 1) = "\", > "", > "\") & "mygraphic.jpg" > > Or if you saved as a function > > Mypath = MyFunc(currentproject.path) & "mygraphic.jpg" > > There we go... > > Max > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Hindman > Sent: Thursday, March 18, 2010 5:01 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] CurrentProject.Path syntax? > > ...but your IIf forces a compare of every condition, Lambert's function > doesn't ...nanosecs, I know ...but still > > William > > -------------------------------------------------- > From: "Max Wanadoo" <max.wanadoo at gmail.com> > Sent: Thursday, March 18, 2010 10:56 AM > To: "'Access Developers discussion and problem solving'" > <accessd at databaseadvisors.com> > Subject: Re: [AccessD] CurrentProject.Path syntax? > >> >> Sigh... >> >> str = str & IIf(Right(str, 1) = "\", "", "\") >> >> Easy peasy - one liner. >> >> Max >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, >> Lambert >> Sent: Thursday, March 18, 2010 2:06 PM >> To: Access Developers discussion and problem solving >> Subject: Re: [AccessD] CurrentProject.Path syntax? >> >> CRAB eh? >> >> I maintain that this code >> >> Public Function QualifyPath(sPath As String) As String >> If sPath & "" > "" Then >> If right$(sPath, 1) = "\" Then >> QualifyPath = sPath >> Else >> QualifyPath = sPath & "\" >> End If >> End If >> End Function >> >> Is thoroughly self documenting and orders of magnitude clearer than >> >> str = "\\svr\c\" >> strL = Left(str, 2) >> strR = Replace(Mid(str, 3) & "\", "\\", "\") >> str = strL & strR >> >> In fact I'd go as far as to suggest that those few lines of VB code >> are almost as cryptic as some c/c++ code I have reviewed in the past. >> The C family has a well deserved reputation of being a write-only >> language. Well in the hands of some programmers. :-) >> >> >> Lambert >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo >> Sent: Thursday, March 18, 2010 9:50 AM >> To: 'Access Developers discussion and problem solving' >> Subject: Re: [AccessD] CurrentProject.Path syntax? >> >> Are you saying:- >> >> A. mine doesn't >> B. mine is 20th century too. >> >> Co'mon now. Don't beat about the bush...out with it... >> >> Answers: >> A. Mine does UNCs better than yours. Stamps foot and sticks tongue out. >> So >> there! >> C. Mine adheres to the CRAB principle invented by yours truly (Clear, >> Relevant, Accurate and Brief). >> >> There we go...over and out.... >> >> Max >> >> -- >> AccessD mailing list >> AccessD at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/accessd >> Website: http://www.databaseadvisors.com >> >> -- >> AccessD mailing list >> AccessD at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/accessd >> Website: http://www.databaseadvisors.com >> > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >