Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 656
  • Last Modified:

Find first syntax when it is a string.

Hi,

I am getting error

Private Sub Combo3_AfterUpdate()
Dim rs As Object
   
    Set rs = Me.Recordset.Clone
    rs.FindFirst "[CaseNumber] = " & Str(Me![Combo3])
    Me.Bookmark = rs.Bookmark
   
End Sub

I am getting data type mismatch error at line.

rs.findfirst "[Casenumber] = " & Str(Me![Combo3])

the Casenumber described is a textfield.

Thanks

0
bnaidu
Asked:
bnaidu
1 Solution
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
>the Casenumber described is a textfield.
In that case you need to delineate the value with single quote marks.

rs.findfirst "[Casenumber] = '" & Str(Me![Combo3]) & "'"
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now