recordset.FindFirst

G

Guest

the FindFirst is not working, I can't see anything wrong. I am trying to get
bound combo boxes to show the record I am searching for.

Debug.Pring shows strSearch is:

(VehLicence = "321abc") AND (VehYear = 1990) AND (VehMake = "AMC")

(VehLicence and VehicleMake are of type string and year is number)
below is my code, any help would be appreciated.

Dim rs As Object
Dim strSearch As String
Set rs = Me.Recordset.Clone

strSearch = MakeSearchString ' programmer defined function
rs.FindFirst strSearch
Me.Bookmark = rs.Bookmark

PS. When I try to exit I am also getting an error message "Update or
cancel update without addnew or edit"
 
K

kingston via AccessMonster.com

This is because you've only got ADO methods available and you're trying to
use a DAO method. Yes, it's confusing. Use .MoveFirst and then .Find
instead.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top