Tuesday, April 5, 2011

Thursday, January 20, 2011

Finding char in string - not from starting position

InStr ( ([comma]+1) , [Match_addr] ,",")

this is compared to finding from starting position

InStr ( ([Match_addr] ,",")

NOTE! for some reason, InStr ( ([comma]+1) , [Match_addr] ,",")
would NOT work without the +1. It will also work with a simple integer, but a field seems to require the plus modifier? Minus also didnt seem work.

Tuesday, November 9, 2010

Multiple line labels

Function FindLabel ([Suburb],[Organisati],[Total])
maxChrs = 24
oldTxt = [Suburb]&vbnewline&[Organisati]&vbnewline&[Total]
While Len(oldTxt) > maxChrs
ptr = InStrRev(Left(oldTxt, maxChrs), " ")
If ptr = 0 Then
ptr = InStr(oldTxt, " ")
If ptr = 0 Then ptr = Len(oldTxt) + 1
End If
newTxt = newTxt + Left(oldTxt, ptr - 1) + vbCrLf
oldTxt = Mid(oldTxt, ptr + 1)
Wend
If oldTxt <> "" Then newTxt = newTxt + oldTxt

FindLabel = newTxt
End Function

Thursday, November 4, 2010

Wednesday, October 27, 2010

Xmas list

Cycle computer

mountain bike shoes and cleat

lights

best aussie albums book

zen art of bike maintenence book