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 / General 2 / January 2008

Tip: Looking for answers? Try searching our database.

Goto Record

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pierre - 16 Jan 2008 16:19 GMT
I'm going to use a code I found in a post dated 1/16/2008:Goto Record
Problem.  Doing so I ran into a problem.  
Once I entered the code in Text256_AfterUpdate I recived the following Run
Time error '13' Type mismatch.

'Here is the modified code I entered.
Private Sub Text256_AfterUpdate()
    Dim rs As Object
    Set rs - Me.Recordset.Clone
'NOTE: BELOW LINE is hightlighted in yellow when I debug
    rs.FindFirst "[Sur Name] = " & Str(Nz(Me![Text256],0))
    If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Me.[Given Name].SetFocus
Me.Text256 = ""
End Sub

' Can anyone please provide some input as to what I could have done wronge.

Signature

Work is sometimes hard....but someone has to do it.

Jeanette Cunningham - 16 Jan 2008 20:41 GMT
Pierre,
this is how I usually do this type of thing
Check that the LastName field in your table is called Sur Name with a space
in it and not SurName

Private Sub Text256_AfterUpdate()
    Dim rs As DAO.recordset
    Set rs = Me.Recordset.Clone
    If Not IsNull(Me.Text256) Then
        rs.FindFirst "[Sur Name] = """ & Me.Text256 & """"
        If Not rs.NoMatch Then
               Me.Bookmark = rs.Bookmark
               Me.[Given Name].SetFocus
        Else
               Msgbox "Not found"
       End If
   End If
   set rs = nothing
End Sub

Jeanette Cunningham

> I'm going to use a code I found in a post dated 1/16/2008:Goto Record
> Problem.  Doing so I ran into a problem.
[quoted text clipped - 14 lines]
> ' Can anyone please provide some input as to what I could have done
> wronge.
 
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.