Greetings:
I have a hyperlink field which contains the path and file name of a pdf
document (5.065-s.pdf) which I'm trying to look for in another table
that also has a hyperlink field containing a path and file name.
I'm using the Like operator to just look for the file name from the
first recordset in the second recordset, but I can't get it to work. I
know the file is there, but I can't do it in VBA code or in the QBE
grid. I've tried:
Like 5.065-s.pdf
Like *5.065-s.pdf
Like *5.065-s.pdf*
Like *"5.065-s.pdf"*
Like "*5.065-s.pdf*"
All to no avail. Are the dots and hyphens being interpreted as special
characters?
TIA
Keith
Jeff Johnson [MVP: VB] - 26 Nov 2004 05:52 GMT
> I'm using the Like operator to just look for the file name from the
> first recordset in the second recordset, but I can't get it to work.
ADO? Use the % and _ wildcards instead of * and ?.
Keith Gardner - 26 Nov 2004 06:21 GMT
Thanks for the reply.
I'm using DAO.
Are comparisons of hyperlink fields different than regular fields? To
set them I had to use:
field = "#hyperlink address#"
That sets just the hyperlink text, but that is also what is displayed in
the textbox. So does that mean I have to use some different syntax in
the Like statement to get it to look at the hyperlink address?
Or, as I asked previously, are the symbols in the file name (-.) causing
a problem with Like?
Thanks again
Keith
Jeff Johnson [MVP: VB] - 26 Nov 2004 22:25 GMT
> I'm using DAO.
>
> Are comparisons of hyperlink fields different than regular fields?
At this point I think you'd be better served asking in one of the
microsoft.public.access.* newsgroups. Are you using full-blown VB (which
this group is for) or VBA under Access?
Dave - 30 Nov 2004 09:46 GMT
It would help to see the entire line with the LIKE constraint and any error
messages you get, but try this:
LIKE '*5.065-s.pdf*'
note: apostrophes instead of quotes.
Dave
> Greetings:
>
[quoted text clipped - 22 lines]
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!