Searching OLE

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am currently in the process of changing a database written in access97 to run in access2000. Despite the promises from Microsoft this is not necessarily a smooth process

I have a table which included a bound OLE. This is used to store a text or word file. I had a very simple search which searched the attached document, the SQL is as follows which was run from a VB function,

table.document LIKE *+"+format(forms!search!search)+"+

In Access 97 this works fine for any attached text or word documents but unfortunately access2000 is not as co-operative

Does anyone know how to do simple text searchs in attached documents

Thank you for your hel
 
-----Original Message-----
I am currently in the process of changing a database
written in access97 to run in access2000. Despite the
promises from Microsoft this is not necessarily a smooth
process.
I have a table which included a bound OLE. This is used
to store a text or word file. I had a very simple search
which searched the attached document, the SQL is as
follows which was run from a VB function,
table.document LIKE *+"+format(forms!search!search)+"+*

In Access 97 this works fine for any attached text or
word documents but unfortunately access2000 is not as co-
operative.
Does anyone know how to do simple text searchs in attached documents?

Thank you for your help
Try this
table.document like *" & """Forms!search.search""" & "*"
'I hope I got the "s right'

I always have a hard time keeping quotes straight around
interted strings in an SQL statement. I usually write a
small function to return the information as a string with
the quotes as part of the string

public function addQuotes(s as string) as string
addquotes = chr(34) & s & chr(34)
end function

table.document likd *" & addquotes(Forms!search.search)
& "*"

This is of course assuming that there is a field called
search on the form called search.

Hope this works.

MW
with this youc an rewrite the above as
 
Thanks for this but I think my problem is more fundemental and to do with searching OLE bound documents.

I have created a table with a primary key (autonumber) and feild Name(text) and another feild Document(OLE).
I have put some information into the table embedding word files into the Document Field.
I have designed a query with the feilds Name and Document and set the Criteria of the document feild to Like "*apple*".
Despite the word apple appearing in attached documents the query fails to find the records.

Trying this in access97 works fine but in acess2000 I have problems.

Does anyone know how to get this to work in access2000 or can suggest where I can find this out.

Thanks
 
Back
Top