UPdate a Field

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Proaccesspro
    New Member
    • Apr 2007
    • 132

    #1

    UPdate a Field

    Trying to update a field in a table named CASE. How do I reference the particular field name?? The code is not working!!

    Dim SSNreplace As String

    SSNreplace = InputBox("Pleas e enter the Member's SSN", "Update a SSN")

    If SSNreplace = "" Then

    MsgBox "No Number Entered. Please Try Again", vbCritical, "Update a SSN"

    GoTo Flag1

    End If

    *********HERE IS WHERE MY CODE IS INCORRECT******
    If myrs![SSN] = SSNreplace Then
    MsgBox "Match Found For: " & SSNreplace, vbInformation, "Update a SSN"
    myrs.Update
    'PersonID.SetFo cus
    'txtSearchID = "" 'textbox equivalent to your input box

    Else

    MsgBox "Sorry, SSN NOT Found. Please Try Again", vbCritical, "Update a SSN"

    End If
  • JKing
    Recognized Expert Top Contributor
    • Jun 2007
    • 1206

    #2
    Let me clarify what you plan to do exactly. First you want the user to enter in a SSN into an input box. If the SSN the user entered is found within the recordset then you want to give them an option to change it to something new?

    Comment

    Working...