Problem 1
I have a memo field called NOTES in my database and I have constructed
various queries so the user can search this NOTES memo field for any
freetext held within it. As this memo field has large chunks of text inside
it, the search results are not easy to find, do you know how I can turn the
search result on the form into a hi-lighted result? and with every other
occurrence to be highlighted as well in this NOTES field, on the current
record and any subsequent records the query would find?
Example of my Criteria in the Query:
Like "*" & [Search NOTES for the following ] & "*"
Problem 2
I have one main table with a a few other tables, all linked together with
under a URN (Unique Ref No) e.g., How can I create a query on my Search form
that will search or filter out, say an address or telephone number from the
relevant Subform and display the result (possibly hi-lighted) in the Form
InputRecords?
Tables
Table - InputRecords
Table - InputRecordsAddr
Table - Input RecordsTelNos
Table - Input RecordsPersonalDetails
Forms
Form - MainMenu
Form - InputRecords
Form - SubformAddr
Form - SubformTelNos
Form - SubformPersonalDetails
Form - Searching
Any and all assistance will of course be received with the greatest of
appreciation from this novice bottom rung amebia MSAccess developer can
summon.
Jan Szymczuk
If this is really important to you, it may be possible to download a rich
text box, and programmatically generate the rich text. Stephen Lebans has
one at:
www.lebans.com
Problem 2
See:
Filter a Form on a Field in a Subform
at:
http://members.iinet.net.au/~allenbrowne/ser-28.html
The article explains how to set the RecordSource of the main form to an
inner join statement so that it contains only those records that have a
match in the subform. It would also be possible to use a subquery in the
Filter of the form.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Jan Szymczuk" <szym...@btinternet.com> wrote in message
news:cqemrk$3dh$1...@sparta.btinternet.com...
Problem1
I have this solution for problem 1: it highlightes the serachtext
(Tekstkeuze) in the memofield (Beschrijving) and waits 3 sec. before showing
the next apperance in the same memo by using SelStart and SelLength.
The routine ends with a msgbox: "serachstring is 2 times found in this memo
and now you see the last apperance"
Sorry for my English !
I hope its usefull.
Filip
Dim intWaar, aantal, startPositie As Integer
startPositie = 1
Me!Beschrijving.SetFocus
If InStr(startPositie, Me!Beschrijving, Tekstkeuze) = 0 Then MsgBox "Niet in
deze tekst": Exit Sub
Do
intWaar = InStr(startPositie, Me!Beschrijving, Tekstkeuze)
Me!Beschrijving.SelStart = intWaar - 1
Me!Beschrijving.SelLength = Len(Tekstkeuze) ' Lengte selectie instellen.
startPositie = intWaar + Len(Tekstkeuze)
aantal = aantal + 1
Wait(3)
Loop Until InStr(startPositie, Me!Beschrijving, Tekstkeuze) = 0
If aantal <> 1 Then MsgBox "'" & Tekstkeuze & "' is " & aantal & " keer in
deze tekst" & Chr(13) & "U ziet de laatste geselecteerd"
"Jan Szymczuk" <szym...@btinternet.com> wrote in message
news:cqemrk$3dh$1...@sparta.btinternet.com...