Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2007

    Unanswered: Method or Data Member Not Found

    Hello all;

    I'm getting an error "Method or Data Member Not Found" at line "rs.Edit" in the below code. Does anyone have a guess as to why? I tried changing the Recordset to DAO but that gives me a type mismatch error? Perplexed? Thanks in advance for any suggestions.

    On Error GoTo Err_cmdSave_Click
    Dim vntRetVar As Variant
    Dim db As Database
    Dim rs As Recordset
    Set db = CurrentDb()
    Set rs = db.OpenRecordset("tblImageBLOBs")
    'If Validated, Save; if not, just return to Form
    If Validate Then
    vntRetVar = ReadBLOB(Me![imgTheImage].Picture, rs, "ImageItem")
    If vntRetVar <= 0 Then GoTo SpecialError
    rs("ImageShortName") = Me![txtImageShortName]
    rs("ImageName") = Me![txtImageName]
    rs("ImageFileExtension") = Right(Me![imgTheImage].Picture, 3)
    On Error Resume Next
    DoCmd.Echo False
    DoCmd.Echo True
    DoCmd.Close acForm, Me.Name
    End If
    On Error Resume Next
    Set rs = Nothing
    Set db = Nothing
    Exit Sub
    MsgBox "Err: " & Err.Number & " : " & Err.Description & _
    " in Sub cmdSave_Click", vbCritical, "Images in Access Example"
    Resume Exit_cmdSave_Click
    MsgBox "Error " & -vntRetVar & " trying to write the BLOB", vbExclamation, "Images in Access Example"
    Resume Exit_cmdSave_Click
    End Sub

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    thats almost certainly a missing reference or library

    check what libraries are associated with this code int he code editor.

    make sure you don't confuse ADO with DAO or vice versa, be consistent with your data objects use either or but not both (unless of course you need TO)

    However its possible that you have moved beyond the current recordset (its possible that a recordset may empty.. that could casue an error

    incidentally when posting code please enlcose it in code tags <squarebracket'['>code<squarebracket']'>
    I think its the # button on the normal reply function. it makes reading code much much easier

  3. #3
    Join Date
    Mar 2007
    Thanks very much for the input....sorry about the lack of code tags...whoops

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts