• Variables in SQL statements….

    Author
    Topic
    #355047

    I’m sure this is possible, but i’ve tried all the altenatives in terms odf syntax i can think of…

    I create a temporary table which is a copy of a master, but named according to a couple of variables..

    Dim strGPUK As String
    Dim strDate As Date
    Dim strTableName As String

    strGPUK = Me.Selected
    strDate = Date

    strTableName = “tblTempOrder” & “_” & strGPUK & “_” & strDate

    docmd.CopyObject , strTableName, acTable, “tblTempOrderTemplate”

    Now i want to append one record into this table using an INSERT INTO statement, but i can’t work out the syntax for the table name….

    I thought it would be something like INSERT INTO “strTempTable” ……

    Thanking you in advance

    Viewing 0 reply threads
    Author
    Replies
    Viewing 0 reply threads
    Reply To: Variables in SQL statements….

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: