Run-time error '3146'

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Dale (dale0610_at_hotmail.com)
Date: 04/02/04

  • Next message: Almost Done: "Leading Zeros for SSN is a masked Edit Box"
    Date: Fri, 02 Apr 2004 11:28:44 -0800
    
    

    Hi folks,

    I have code like below that fails on the Update giving a 3146 ODBC--call
    failed error.

    Dim dbKCRetailTemp As DAO.Database
    Dim rstMainProductBatchesHeader As DAO.Recordset

    Set dbKCRetailTemp = OpenDatabase(strKCRetailDirectory + "KCRetail.mdb")
    Set rstMainProductBatchesHeader =
    dbKCRetailTemp.OpenRecordset("ProductBatchesHeader")
    rstMainProductBatchesHeader.AddNew
    rstMainProductBatchesHeader!BatchNo = sOnBatchName
    rstMainProductBatchesHeader.Update

    I have no clue what is happening. The database seems to open fine
    because I can move to the first record and show values from it in a
    messagebox fine. I used this code on another table in the same database
    and it works. I can also open the table up in Access and add a record
    with that one field value and it works fine. Can anymore suggest
    things I can look into? I have also used Thanks.


  • Next message: Almost Done: "Leading Zeros for SSN is a masked Edit Box"