How do I add a code to this that would make the format stick exactly like it is in Access into excel?
I tried following this link but it is not working :/ Exporting to excel loses the date format
This is my VBA.
Private Sub Command69_Click()
On Error GoTo Err_Command69_Click
Dim stDocName As String
stDocName = "q_Reg_Disp_Rpt_by_CMS_Reg_Due_Date"
DoCmd.OpenQuery stDocName, acNormal, acEdit
DoCmd.OutputTo acOutputQuery, "q_Reg_Disp_Rpt_by_CMS_Reg_Due_Date", "Excel Workbook (*.xlsx)", , True
Exit_Command69_Click:
Exit Sub
Err_Command69_Click:
MsgBox Err.Description
Resume Exit_Command69_Click
End Sub