Results 1 to 8 of 8
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    dubt on import from mdb (2000 sr -1)

    this macro import mdb into acexcel.
    have many dubt:

    1) is correct to use ELSE statement before the macro copy record in sheet
    2) existis a methood to make a speedly the searching to intercept dupes in R before copy record
    3) but my code set_found.... ecc, loop in all cells of column R (filled and not filled)

    in my mdb have 8000/9000 record to import all after 2 hours it continue the import, now have 2300 record in sheet after this time...

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: dubt on import from mdb (2000 sr -1)

    Does the attached code work better?

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: dubt on import from mdb (2000 sr -1)

    WORK PERFECT!

    But your "student", lost "," from COPE and NPROPOSTA in:

    strSQL = "SELECT DISTINCT FIL, TIP, SOC, PROD, SOTTOSCRITTORE, COPE" & _
    "NPROPOSTA, DA, IMPORTO, RET, DP, STATO, TIP, DAL, AL, TIP1, PROD1, PROVA18 " & _
    "FROM BANCA_ASS_H7469"

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: dubt on import from mdb (2000 sr -1)

    Sorry, that should be
    <code>
    ... COPE, " & _
    "NPROPOSTA, ...</code>

  5. #5
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: dubt on import from mdb (2000 sr -1)

    no prob, i know "write code on fly)...

    But in effect the macro add to the up last line free of sheet the records....

    in this case the code not controll if already line in sheet are filed and contain in R the same index of record from mdb, or not?

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: dubt on import from mdb (2000 sr -1)

    The code only avoids duplicates in the Access table, it doesn't check for overlap between the Access table and the Excel sheet. If you need that, you'll have to live with the slower code you already had.

  7. #7
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: dubt on import from mdb (2000 sr -1)

    Hi Hans about this code i have see an article to ado/dao in microsoft and it refer to use Cursor Type of Rset i variuos mode
    read Writeand read write in my code whic i have used, i not have understand..
    In other case my code read only i can use the cursor in read mode only, because i use only in read mode...

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: dubt on import from mdb (2000 sr -1)

    What is your question?

Posting Permissions

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