D
Denver
Hello,
I have a cmdExportthisExcel with this code
Dim strSql As String
strSql = "SELECT* FROM [DCN01]"
With Me.[Data_Entry2_subform].Form
If .FilterOn Then
strSql = strSql & " WHERE " & .Filter
End If
End With
Debug.Print SQL
strSql = strSql & " ORDER BY [Drawing Ref];"
CurrentDb.QueryDefs("qryExport").SQL = strSql
DoCmd.TransferSpreadsheet acExport, 8, "qryExport", _
"D:\"
i want this code to export to excel what i have filtered in my subform.
the problem is i have this Run time Error 2220: Eng'g Database can't open
the file 'D:\'.
is there anyone is kind to help me to fix this code?
or what else do i miss in my codes?
i've been using this path "D:\" to some of my database function when exporting
but now i can't open it.
i doubt there is something wrong with my codes specially my codes
DoCmd.TransferSpreadsheet acExport, 8, "qryExport", _
"D:\"
i think i miss some arguments here?
can anyone help me witht this?
thanks for any help.
I have a cmdExportthisExcel with this code
Dim strSql As String
strSql = "SELECT* FROM [DCN01]"
With Me.[Data_Entry2_subform].Form
If .FilterOn Then
strSql = strSql & " WHERE " & .Filter
End If
End With
Debug.Print SQL
strSql = strSql & " ORDER BY [Drawing Ref];"
CurrentDb.QueryDefs("qryExport").SQL = strSql
DoCmd.TransferSpreadsheet acExport, 8, "qryExport", _
"D:\"
i want this code to export to excel what i have filtered in my subform.
the problem is i have this Run time Error 2220: Eng'g Database can't open
the file 'D:\'.
is there anyone is kind to help me to fix this code?
or what else do i miss in my codes?
i've been using this path "D:\" to some of my database function when exporting
but now i can't open it.
i doubt there is something wrong with my codes specially my codes
DoCmd.TransferSpreadsheet acExport, 8, "qryExport", _
"D:\"
i think i miss some arguments here?
can anyone help me witht this?
thanks for any help.