Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / December 2005

Tip: Looking for answers? Try searching our database.

Bookmarking finding a string

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steven - 30 Dec 2005 23:46 GMT
I am trying to find the first record and next record without using the Access
menu bar binocular control command button ie(The Find in Field) button.  I
wanted to be able to use just part of the string.  I was trying something
like:

Me.RecordsetClone.FindFirst "[Category] Like '*" & [Forms]![Bud]![Text17] &
"*'"
Me.Bookmark = Me.RecordsetClone.Bookmark

But this did not take me to the first item that I know exists and should
match.

How do I do this for finding a string within the entire field and go to that
record in the continuous form by coding it myself and not using the access
find?

Thanks,

Steven
Marshall Barton - 31 Dec 2005 00:15 GMT
>I am trying to find the first record and next record without using the Access
>menu bar binocular control command button ie(The Find in Field) button.  I
[quoted text clipped - 11 lines]
>record in the continuous form by coding it myself and not using the access
>find?

FindFirst should do what you want, but you should check
NoMatch to make sure a record was found.  Just in case the
search text contains a ', I would use " because it's less
likely to occur in a data field:

With Me.RecordsetClone
    .FindFirst "[Category] Like ""*" & Me.Text17 & "*"""
    If .NoMatch Then
        Beep
    Else
        Me.Bookmark = .Bookmark
    End If
End With

Signature

Marsh
MVP [MS Access]

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.