+ Reply to Thread
Results 1 to 2 of 2

Open another recordset within current recordset vba

  1. #1
    Forum Contributor
    Join Date
    02-20-2009
    Location
    bristol
    MS-Off Ver
    Excel 2003
    Posts
    882

    Open another recordset within current recordset vba

    Hi Guys



    I am writing the following code to copy data from Access table to Excelsheet. The thing is there is one more table that stores all the barcodes for each UniqueID. I want to display all the barcodes from a different table in the below code for each UniqueID. I can't close the recorset as I am looking for a option to open another recorset within this. Is it possible?



    Please Login or Register  to view this content.


    Any help will be much appreciated.



    Thanks

  2. #2
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Open another recordset within current recordset vba

    Hi aman1234,

    I could think of 2 possibilities here:
    1. Change the SQL statement of your existing recordset to include the 2nd table using a join so you'll have the barcode directly
    Please Login or Register  to view this content.
    OR 2. Use a 2nd recordset with a query to your 2nd table like:
    Please Login or Register  to view this content.
    Please use [CODE]-TAGS
    When your problem is solved mark the thread SOLVED
    If an answer has helped you please click to give reputation
    Read the FORUM RULES

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. run a sql statement in for loop and open a recordset
    By rfjkzxc in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-11-2013, 11:18 PM
  2. Open the recordset in access and use table name in dmax statement
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-10-2010, 06:56 AM
  3. Recordset Query : how to open and retrieve DB
    By superkid in forum Access Programming / VBA / Macros
    Replies: 3
    Last Post: 08-27-2009, 05:31 PM
  4. Thow exception 0x80040e14 when I want to open RecordSet of excel via ado
    By winniewang11 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-15-2008, 07:57 AM
  5. [SOLVED] Need ADO Recordset Help
    By Mr B in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-21-2006, 11:55 AM
  6. Open recordset using ODBC
    By Mr B in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-19-2006, 02:15 PM
  7. [SOLVED] How to open Access recordset via Query in Excel VBA???
    By Hexman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-29-2006, 03:15 PM
  8. [SOLVED] Recordset's RowID as part of Recordset
    By Trip in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-22-2005, 06:55 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1