Share via

Microsoft Access Automation Error

Anonymous
2016-04-06T14:18:41+00:00

I am using Access 2010 with Windows 7 Professional. When submitting a record using a vbs button to submit, I get the following message" automation error a microsoft software installer error was encountered". Although I get this message the record is still inserted into the table. How can I get rid of the message. Thanks very much.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. Anonymous
    2016-04-06T15:57:35+00:00

    Hi Dan, I will do that, however, I forgot to mention that it works on all computers except one. I don't know if that makes any difference.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2016-04-06T15:08:35+00:00

    The best way to debug these problems is to simply comment out your error handler temporarily and when the error occurs choose to debug it and see what line of code Access returns as being problematic.  Then go from there.

    You should also get into the habit of closing anything you open, so in this case at the end you should perform:

    rstApplicant.Close

    Set rstApplicant = Nothing

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2016-04-06T15:01:37+00:00

    Hi Dan,

    Here is the code below:

    Private Sub cmdSave_Click()

    On Error GoTo Err_cmdSave_Click

    Dim db As DAO.Database

    Dim rstApplicant As DAO.Recordset

       Set db = CurrentDb

       Set rstApplicant = db.OpenRecordset("applicant")

       rstApplicant.AddNew

       rstApplicant!RDate = RDate

       rstApplicant!FName = FName

       rstApplicant!LName = LName

       rstApplicant!MName = MName

       rstApplicant!DOB = DOB

       rstApplicant!Nationality = NAT

       rstApplicant!AddressInBahamas = LocalAdd

       rstApplicant!PPNo = PPNum

       rstApplicant!Airline = Airline

       rstApplicant!Position = Position

       rstApplicant!Company = Company

       rstApplicant!Department = Department

       rstApplicant!PONumber = PONumber

       rstApplicant!JobDesc = JobDesc

       rstApplicant!Account = Account

       rstApplicant!AStatus = "New"

       rstApplicant!POLink = "PO " & PONumber & "#" & POLink.Caption & "#"

       rstApplicant!SDate = SDate

       rstApplicant!EDate = EDate

       rstApplicant!FlightNo = FlightNo

       rstApplicant!Length = Length

       rstApplicant!EnteredBy = "h"

       rstApplicant!EnteredDate = Now

       rstApplicant!EmerCode = EmerCode

       rstApplicant.Update

        If cSendAttachment Then

            SendMessage False, FName, LName, POLink.Caption

        Else

            SendMessage False, FName, LName

        End If

        'If Me.Dirty Then Me.Dirty = False

        DoCmd.Close

    Exit_cmdSave_Click:

        Exit Sub

    Err_cmdSave_Click:

        MsgBox Err.Description

        Resume Exit_cmdSave_Click

    End Sub

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2016-04-06T14:26:48+00:00

    "vbs button"?  Could you show us your code.

    Was this answer helpful?

    0 comments No comments