findfirst errors 
Author Message
 findfirst errors

Hi
This is probably a no brainer but I am having trouble getting a findfirst to
run. Using
    rst.findfirst "[firstfield]=" & rst2![firstfield]
I get an error that the Jet engine doesn't recognize 'albert' as a valid
field (albert is the literal value of [firstfield] in this case). If I use
the indexed id value instead of the text string the syntax works fine, but I
want to use the text string.
I just ordered getz's book, it has been praised loudly everywhere I look. In
the meantime I have spent way too much time with what should be the simplest
of procedures.
Any help will be greatly appreciated.
thanks
David DeMeglio


Fri, 15 Jun 2001 03:00:00 GMT  
 findfirst errors

Quote:

>Hi
>This is probably a no brainer but I am having trouble getting a findfirst
to
>run. Using
>    rst.findfirst "[firstfield]=" & rst2![firstfield]
>I get an error that the Jet engine doesn't recognize 'albert' as a valid
>field (albert is the literal value of [firstfield] in this case). If I use
>the indexed id value instead of the text string the syntax works fine, but
I
>want to use the text string.
>I just ordered getz's book, it has been praised loudly everywhere I look.
In
>the meantime I have spent way too much time with what should be the
simplest
>of procedures.
>Any help will be greatly appreciated.
>thanks
>David DeMeglio

I think is a syntax problem...try:

rst.findfirst "[firstfield]='" & rst2![firstfield] & "'"

If you use a string as criteria you must quote it by single quotes.
Rodica



Sat, 16 Jun 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. DAO FindFirst error

2. Help with FindFirst error

3. FindFirst Error Message

4. Findfirst error with '-character ?!!

5. FindFirst Error

6. Findfirst error with apostrophe in string

7. Help Me! Please (Recordset FindFirst Error!!!)

8. 3251 error on .FindFirst ??

9. Getting 3251 error with FindFirst

10. FindFirst runtime error

11. FindFirst gives Error 3251 - Operation not supported?

12. Syntax error in FindFirst criteria

 

 
Powered by phpBB® Forum Software