Hi all,
I am getting an object invalid or no longer set on the below code
I am no sure why as this has been working fine for months
Please could you lead me in the right direction to trouble shoot
The query seems to be working correctly
I am getting an object invalid or no longer set on the below code
I am no sure why as this has been working fine for months
Please could you lead me in the right direction to trouble shoot
The query seems to be working correctly
Private Sub ExcelNotIssued_Click()
On Error GoTo ExcelNotIssued_Click_Err
Dim StrFileName As String
Dim StrQryName As String
Dim StrSaveFile As String
StrFileName = strGetFileFolderName("Spares for Orders (Received, Not Issued)" & " - Registration -" & " " & Forms![CS Orders Detail - Main]![RegCBO], 2, "Excel")
'Debug.Print StrFileName
StrQryName = "Spares for Orders - Received"
If Len(StrFileName & "") < 1 Then
StrFileName = Application.CurrentProject.Path & "\Spares for Orders (Received, Not Issued)" & Format(Date, "yyyymmdd") & ".xls"
End If
'Debug.Print "My File is:" & StrFileName
DoCmd.TransferSpreadsheet acExport, 10, StrQryName, StrFileName, True, , True
ExcelNotIssued_Click_Exit:
Exit Sub
ExcelNotIssued_Click_Err:
MsgBox Error$
Resume ExcelNotIssued_Click_Exit