Re: DAP rs.find



Sylvain / Doug,
I was digging before you came to the rescue with the answer. I read the
difference between a % following the search string (begins with) and having
the search string enclosed by %. Enclosing them means contains the search
string.

Doug, I didn't appreciate that it was actually ADO. When I first looked it
up on MS web site I was searching for rs.find DAP etc.

Something else I noticed is the MS Script Editor doesn't colorize the 'Like'
statement with Office 2003. If you open the page in Front Page 2003 it does.
The behavior with MS Script Editor was confusing to me on the placement of
the 'Like' statement. The behavior of the visual cue is important. And if
you are like me you need all the help you can get.

Thanks to all.

--
Best Regards, John Kraus


"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:uVIxXjcBHHA.4864@xxxxxxxxxxxxxxxxxxxxxxx
You have two %. There is a difference between 'ABC%' and '%ABC%' .

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)


"John K" <jkraus@xxxxxxxxxxxxxx> wrote in message
news:eMwQSacBHHA.3396@xxxxxxxxxxxxxxxxxxxxxxx
Sylvain,
I looked again at the line on the page from aspxtreme that you
referenced and my line isn't the same.

Note the % is between the single quote and the double.

Here is what I have. It works just great.

Dim rs
Set rs = MSODSC.DataPages(0).Recordset.Clone
On error resume next
-->
rs.find "LastName Like '%" & Cstr(InputBox("Please enter LastName to
find", "Find")) & "%'"


--
Best Regards, John Kraus


"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:uPbTZzbBHHA.3836@xxxxxxxxxxxxxxxxxxxxxxx
You're close, the final statement must look like "LastName Like
'NameToSearch%'" and where the string to search is enclosed between
single quote ' instead of double quotes " . DAP understand both % or *.
The underline symbol _ can also be used a the single replacement
character. Fore more examples, see:

http://authors.aspalliance.com/aspxtreme/ado/lettinguserssearchforinformation.aspx?pageno=4

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)


"John K" <jkraus@xxxxxxxxxxxxxx> wrote in message
news:etLhE$aBHHA.3836@xxxxxxxxxxxxxxxxxxxxxxx
Doug,
I had read that using 'Like' is permitted in DAP but I have no idea
of the syntax or even where to place the LIKE statement on the line. I
did read elsewhere that the % is the wildcard character. You wrote that
the 'Like' itself follows the field name and that is one part of the
puzzle. I hope someone knows the syntax that follows. Does it end up
something of this sort, "LastName Like '%' '"

I have no idea of how the statement should look.

--
Best Regards, John Kraus


"Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxxx> wrote in
message news:%23$9uIkYBHHA.3928@xxxxxxxxxxxxxxxxxxxxxxx
rs.find "LastName Like '" & CStr(InputBox("Please enter LastName to
find", "Find")) & "'*"

To be honest, I've never worked with DAPs. It's possible you'll need
to use % rather than * (DAO uses * as the wildcard symbol, ADO uses %,
and I'm not sure which method DAPs use)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"John K" <jkraus@xxxxxxxxxxxxxx> wrote in message
news:eak6DwXBHHA.5068@xxxxxxxxxxxxxxxxxxxxxxx
I have the rs.find working beautifully but want to use 'LIKE' so I
only have to enter the first three or four characters of a LastName to
retrieve the record.

rs.find "LastName = '" & CStr(InputBox("Please enter LastName to
find", "Find")) & "'"

Can someone show precisely how to modify this line using 'LIKE' so it
isn't necessary to type the entire LastName to find the record? I
have messed with this but I have no idea how to do it.

--
Best Regards, John Kraus













.



Relevant Pages

  • Re: Searching a DAP...is it possible???
    ... Outstanding info Sylvain. ... code writing wizards like FrontPage that'll help with development of those ... DAP cannot use a product picture from Access. ...
    (microsoft.public.access.dataaccess.pages)
  • Re: Accessing db through internet.
    ... Sylvain, you've been very kind taking time on explaining to me. ... > Internet, so you have to use an intermediate transport layer such as RDS. ... > DAP: ...
    (microsoft.public.access.dataaccess.pages)
  • Re: DAP rs.find
    ... underline symbol _ can also be used a the single replacement character. ... Sylvain Lafontaine, ing. ... I've never worked with DAPs. ... Doug Steele, Microsoft Access MVP ...
    (microsoft.public.access.dataaccess.pages)
  • Re: Necessary components not installed for DAP
    ... Thanks for confirming that everything works fine if you manually pull DAP ... "Nikos Yannacopoulos" wrote: ... > Sylvain Lafontaine wrote: ... >> DAP pages won't work in Mozilla; however, by opening IE and then opening ...
    (microsoft.public.access.dataaccess.pages)