1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

DBEngine(0)(0).Execute Help please

Discussion in 'Business Applications' started by Alchemi, Oct 22, 2019.

  1. Alchemi

    Alchemi Thread Starter

    Sep 13, 2018
    First Name:

    I've spent a couple days on this and I'm down to one last annoying issue. I'm at this part in my coding:

    'Duplicate the related records: append query.
    If Me.[Specifications_sfrm].Form.RecordsetClone.RecordCount > 0 Then
    strSql = "INSERT INTO Specifications_tbl ( [Item Number], Color ) " & _
    "SELECT " & NewItemCode & " As [Item Number], Color " & _
    "FROM Specifications_tbl WHERE [Item Number] = " & Me.[Item Number] & ";"
    DBEngine(0)(0).Execute strSql, dbFailOnError

    Everything works fine until the last line regarding the DBEngine. Run Time Error 3061: Two few parameters, expecting 2.

    strSql is previously defined as string, NewItemCode is also defined as string. I think I have my "parts" in the right spots. I'm just going to use two INSERT INTO fields so as to worry about few things at once, I was concerned about spelling errors causing pain.

    Would appreciate someone to double check this.
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Short URL to this thread: https://techguy.org/1234599

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice