PDA

View Full Version : Solved: find any part of any string



wasim_sono
04-17-2009, 03:56 AM
Dear all

I want to use the procedure as used in Find command of access tool "any part of field" in my form.

I want to use a combo box or a text box in which user enter desire text (whixh may be a part of string or complete string with blanks) and then press a search button. The result should be display in another text box.

Any help please.

Wasim

DarkSprout
04-17-2009, 06:02 AM
?InStr(1, "any part of field", "part")
Returns the text position, So
If InStr(1, "any part of field", "part") > 0 Then
Also use the Like command
?"any part of field" Like "*part*"
Returns True (if it is true)

To examine a Forms Field use:
If [umbFormField] Like "*text*" Then

Enjoy,