Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004

    Unanswered: Edit record using VBA

    I am not sure whether you all have checked my previous message, I posted again. Thanks. I tried to edit the record. It didn't work. could you please check my code for me?

    I think the line of code: Set rstTableE = dbs.OpenRecordset(strSelect)
    caused the stop to edit.

    Dim dbsE As DAO.Database
    Set dbsE = CurrentDb
    Dim rstTableE As DAO.Recordset

    Dim strSelect As String
    strSelect = "Select * from tblReceipt where ReceiptNumber = " & txtReceiptNumber

    Set rstTableE = dbs.OpenRecordset(strSelect)

    With rstTableE

    !ReceiptDate = Me.txtReceiptDate
    !Fund = Me.cboFund.Value
    !Category = Me.lstCategory.Value

    !ReceivedFromFName = Me.txtReceivedFromFName
    !ReceivedFromLName = Me.txtReceivedFromLName
    !Company = Me.txtCompany
    !Country = Me.txtCountry
    !Memo = Me.tMemo


  2. #2
    Join Date
    May 2005
    Try not to double post please yyu.

    Let's continue this on the original thread.
    Me.Geek = True

Posting Permissions

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