Kayleigh
Member
- Local time
- Today, 00:55
- Joined
- Sep 24, 2020
- Messages
- 706
I'm trying to export a specific query as XLSX/RTF through onClick of button on form but getting Error 3326 - recordset not updateable. Can anyone help me how to resolve this?
I understand that this may be due to the query being crosstab but there must be a way of exporting it!
Here is the code - which worked fine when I did an export of the form itself...
I understand that this may be due to the query being crosstab but there must be a way of exporting it!
Here is the code - which worked fine when I did an export of the form itself...
Code:
Public Sub exportStaffTimetable(myTitle As String)
Dim Fldr As String
With Application.FileDialog(4)
.AllowMultiSelect = False
If .show <> -1 Then Exit Sub
Fldr = .SelectedItems(1)
End With
DoCmd.OutputTo acOutputQuery, "qrySessionsStaffDetailsCT", acFormatXLSX, Fldr & "\" & myTitle & ".xlsx", True
End Sub
Last edited: