View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
TK TK is offline
external usenet poster
 
Posts: 177
Default import access into excel

Hi sal

"sal21" wrote:



Please make your test with my MDB
Private Sub IMPORT_ACCES()


Dim DB_Name As String
DB_Name = ("\\GCD01F4500\DATI\PUBBLICA\BOUASS\PROVA.MDB")


I think you need to lose the \\

DB_Name = ("Drive :\Dir\sub Dir\File_Name.MDB")

On this machine the path is as follows.
DB_Name = ("C:\Documents and Settings\The Cat Man\My Documents\Test.mdb")


Just a suggestion:

Dim strSQL As String


strSQL = "SELECT DATA_CONT, DIP, COD_BATCH, C/C, NOMINATIVO, CAUS,
DARE, AVERE, VAL, SPORT_MIT, ANOM, DESCR, CRO, ABI, CAB, PAG_IMP,
NR_ASS, MT, SERVIZIO, NOTE_BOU, SPESE, DATA_ATT, COD, NOTA_LIB " & _
"FROM TOTALE ORDER BY NR_ASS"


strSQL = "Select * FROM Totale"

This retrives all fields without the the chance of so many typos,
once the procedeure is working narrow your curser as necessary.

Good Luck

TK