srchstr = Forms![frmName]![fldName]
trimstr = Trim(srchstr)
brk_pos = InStr(1, trimstr, ".")
If brk_pos <> 0 Then
end_str = Left(trimstr, brk_pos - 1)
Else
end_str = trimstr
End If
Variable names are of course arbitrary, those are just what were used in the DB I was working on. Had to parse a City, State search entry into separate values to be part of a table search.
|