Search Text box not working after table was moved to SQL server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Paula Fox
    New Member
    • Jan 2011
    • 2

    Search Text box not working after table was moved to SQL server

    Recently, my access database main records table was "cloned" and is now being hosted on a SQL server as a linked table to my existing Access database. Now, the Record search box (in the form) does not consistently return the correct record when called. This is intermitant. The search function will work for maybe 5 searches, then will display a totally incorrect record out of the blue. I realize SQL server and Access have different data types, and we fixed all the issues associated with this, that we know of.

    The existing (unlinked) table used prior to this move has NEVER had this issue, so I know it is somehow associated with the linked table. Any ideas? I am not the most experienced Access programmer, and the SQL server programmer is not helping. Thanks in advance.
  • dsatino
    Contributor
    • May 2010
    • 393

    #2
    You'll need to supply the details of how the search box works. Post the code that runs when you call the search.

    Once you've done that, we'll have a starting point.

    Comment

    • Paula Fox
      New Member
      • Jan 2011
      • 2

      #3
      WOW! Thanks for the quick response! There is the code for the text search. Hope this is what you are asking.


      Code:
      Private Sub txtClaimIDSearch_AfterUpdate()
          Dim rst As Recordset
          
          Set rst = Me.RecordsetClone
          rst.FindFirst "ClaimID = " & Me.txtClaimIDSearch
          If rst.NoMatch Then
              MsgBox ("No such claim exists")
              Me.txtClaimIDSearch.SetFocus
          Else
              Me.Bookmark = rst.Bookmark
              Me.cboClaimee.SetFocus
          End If
          Me.txtClaimIDSearch = ""
          rst.Close
      
      End Sub
      Last edited by Stewart Ross; Jan 6 '11, 08:44 PM. Reason: Added code tags around code

      Comment

      Working...