T
Tamer
Hi all,
I'm trying to link 3 Access queries to 3 worksheets in an
Excel file. I used the following code in an event click in
a form, the code doesn't return any error, but it doesn't
establish the link as well. What am I missing?
Thanks in advance.
Dim strFileSpec As String
strFileSpec = "M:\Excel Files\SusanFiles.xls"
DoCmd.TransferSpreadsheet acLink, _
acSpreadsheetTypeExcel9,"qry_SuzanFiles_Adoption", _
strFileSpec, True, "Sheet1!"
DoCmd.TransferSpreadsheet acLink, _
acSpreadsheetTypeExcel9, "qry_SuzanFiles_Discharged+Age",_
strFileSpec, True, "Sheet2!"
DoCmd.TransferSpreadsheet acLink,
acSpreadsheetTypeExcel9, "qry_SuzanFiles_FP", _
strFileSpec, True, "Sheet3!"
I'm trying to link 3 Access queries to 3 worksheets in an
Excel file. I used the following code in an event click in
a form, the code doesn't return any error, but it doesn't
establish the link as well. What am I missing?
Thanks in advance.
Dim strFileSpec As String
strFileSpec = "M:\Excel Files\SusanFiles.xls"
DoCmd.TransferSpreadsheet acLink, _
acSpreadsheetTypeExcel9,"qry_SuzanFiles_Adoption", _
strFileSpec, True, "Sheet1!"
DoCmd.TransferSpreadsheet acLink, _
acSpreadsheetTypeExcel9, "qry_SuzanFiles_Discharged+Age",_
strFileSpec, True, "Sheet2!"
DoCmd.TransferSpreadsheet acLink,
acSpreadsheetTypeExcel9, "qry_SuzanFiles_FP", _
strFileSpec, True, "Sheet3!"