recorset nesting issue

Posted on 2011-04-27
Last Modified: 2012-05-11
I need to open a recordset in a query to copy a couple fields then insert them into another table. Not sure if I am going about this right. At the moment I am getting this error in the last line of the code below. "Compole error. Method or data member found".

Any ideas?
Dim db As DAO.Database
Set db = CurrentDb
Dim rst As DAO.Recordset
Dim sSql
sSql = "select * from qryCashFlowCreditToAttribute WHERE SelectTemp= " & "True"

Set rst = db.OpenRecordset(sSql)

    Dim rstCode As DAO.Recordset
    Dim sqlCode As String
    sqlCode = "Select * From tblSupplierInvoices_1"
    Set rstCode = db.OpenRecordset(sqlCode, dbOpenDynaset)
    rstCode![SupplierID] = Me!SupplierID
    rstCode![SupplierName] = Me!SupplierName
    rstCode![VATCategory] = Me!VATCategory
    rstCode![VAT] = Me!VAT
    rstCode![InvoiceAddressCountry] = Me!Country
    rstCode![date] = rst.CashFlowDate

Open in new window

Question by:Shawn
    LVL 75

    Accepted Solution

    I suspect:

    rstCode![date] = rst![CashFlowDate]
    LVL 1

    Expert Comment


    rstCode![date] = rst!CashFlowDate
    I replaced rst.CashFlowDate with rst!CashFlowDate
    LVL 1

    Author Closing Comment

    thanks again!

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    In the previous article, Using a Critera Form to Filter Records (, the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
    Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
    In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now