473,402 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Two problems in Access

Thanks again guys, for your recent assistance. Now as you were so kind to
assist the first time (the solution was so simple and elegant) I was
wondering if you could assist with another couple of problems I am faced
with.

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

www.szymczuk.co.uk
Nov 13 '05 #1
2 1522
Problem 1
The Textbox in Access cannot format part of the text differently, so it
cannot highlight the search results.

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" <sz******@btinternet.com> wrote in message
news:cq**********@sparta.btinternet.com...
Thanks again guys, for your recent assistance. Now as you were so kind to
assist the first time (the solution was so simple and elegant) I was
wondering if you could assist with another couple of problems I am faced
with.

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

www.szymczuk.co.uk

Nov 13 '05 #2
Jan,

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" <sz******@btinternet.com> wrote in message
news:cq**********@sparta.btinternet.com...
Thanks again guys, for your recent assistance. Now as you were so kind to
assist the first time (the solution was so simple and elegant) I was
wondering if you could assist with another couple of problems I am faced
with.

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

www.szymczuk.co.uk

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: David | last post by:
Hi, I want to work with Access 2002. I will need to be able to distribute my application to users that may still have access 2000 on their computers. I know access 2002 has a function that...
1
by: jdola | last post by:
I have a customer that is using Access to create reports from FoxPro tables. We started noticing problems with the indexes on the FoxPro tables. It is to the point where we have to delete and...
2
by: Bill Engel | last post by:
Some computers in our office have Access 2000 and others have Access XP. The original database was written in Access 2000. Is there a reason that code has some problems while being run on the...
2
by: PatrickO | last post by:
Hi to you all, I have some questions. I just converted my Access 97 database to Access 2003. To let it still work i referenced the Jet 2.5/3.5 jet engine in my database. Is this oke?
26
by: jamesbeswick | last post by:
I've been using Access since version 97 and I've migrated to 2003. I've noticed a substantial number of strange ActiveX/OLE and code corruption problems when writing databases. The only solution...
10
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ...
4
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
1
by: Duffman | last post by:
Hi, I have what seems to be a common problem, but the solutions I've found don't seem to work. I would like to use a web service to create a file at a UNC location in a shared file. Currently...
8
by: reema via AccessMonster.com | last post by:
Did any one faces any difficulties ,issuess or problems using Microsoft Access -- Message posted via http://www.accessmonster.com
3
by: Earl Anderson | last post by:
One of the users in our departmental db has Read/Write permissions to a particular form. He was able to access and edit the form at will until 2 weeks ago. His current problem was that he was not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.