Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Access General > Error code 3219...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 92468 of 97473
Post > Topic >>

Error code 3219 HELP

by "Lori2836 via AccessMonster.com" <u23986@[EMAIL PROTECTED] > Aug 6, 2008 at 07:46 PM

Help.  I have inherited a very large database and now have an error code of
3219.  This happens when a command button is clicked to insert info the
user
has typed into another form.  The debug highlights the    Set tblParts =
dbs.
OpenRecordset("Parts", dbOpenTable, dbReadOnly) line.  I'm assuming it may
be
because of the dbReadOnly, but have no idea why it worked before.  This db
has a separate back end as many people access it.  The front end is on
each
desktop by a .bat file, with a copy of db automatically copied onto the
person's C drive, which is what it accesses unless a change has been made,
and a new version created.  I'm not sure if you can help or not, just by
looking at this.

Thanks,
Lori



Private Sub Command27_Click()
   
    Dim dbs As Database
    Set dbs = DBEngine(0).OpenDatabase(strDbsReplica)
    'Set dbs = DBEngine(0).OpenDatabase("C:\Program
Files\Engineering-Change-
Release\ECR Design Master 2.mdb")
    Dim SQLAddPart, Answer As String
    Dim tblParts As DAO.Recordset
    Set tblParts = dbs.OpenRecordset("Parts", dbOpenTable, dbReadOnly)
    Dim boolFoundIt As Boolean
    boolFoundIt = False
    
    SQLAddPart = "INSERT INTO Parts ( [Product Code], [Part Number],
Customer,
[Cust Appr Req], [Part Name], [Planner Code] ) " & _
        "SELECT Forms![Parts]![Product Code] as ProdCode,
Forms![Parts]![Part
Number] AS PartNum, Forms![Parts]!Customer AS Cust,
[Forms]![Parts]![frame14]
AS boolCust, Forms![Parts]![Part Name] AS PartName, Forms![Parts]!text25
AS
PC;"
    
    While Not tblParts.EOF
        If tblParts.Fields(0).Value = Forms![Parts]![Product Code] Then
            boolFoundIt = True
        End If
        tblParts.MoveNext
    Wend
    
    If boolFoundIt = False Then DoCmd.RunSQL SQLAddPart
    
    Forms![New Revisions]![Product Code] = Me.Product_Code
    Forms![New Revisions]![Part Number] = Me.Part_Number
    Forms![New Revisions]![Customer] = Me.Customer
    Forms![New Revisions]![Part Name] = Me.Part_Name
    Forms![New Revisions]![Frame28] = Me.Frame14
    Me.Part_Name.SetFocus
    DoCmd.Close
    
    Set tblParts = Nothing
    Set dbs = Nothing

End Sub

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access/200808/1
 




 2 Posts in Topic:
Error code 3219 HELP
"Lori2836 via Access  2008-08-06 19:46:01 
Re: Error code 3219 HELP
"pietlinden@[EMAIL P  2008-08-06 12:58:05 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 21:41:46 CST 2008.