hi guys. i am currently using ms access 2003. i want to export my reports to an excel file so i did a code like this:
Private Sub cmdActiveListBy EmployeeID_Clic k()
On Error GoTo Err_cmdActiveLi stByEmployeeID_ Click
DoCmd.OutputTo acOutputReport, "AlphaListi ng", acFormatXLS, , True
Exit_cmdActiveL istByEmployeeID _Click:
Exit Sub
Err_cmdActiveLi stByEmployeeID_ Click:
MsgBox Err.Description
Resume Exit_cmdActiveL istByEmployeeID _Click
End Sub
the problem is that when the reports are being exported, data such as dates are not displayed properly on excel. the dates are converted into texts. fonts do also vary. how can i be able to format the excel spreadsheet so that the reports will be shown properly?
thanks in advance...
Private Sub cmdActiveListBy EmployeeID_Clic k()
On Error GoTo Err_cmdActiveLi stByEmployeeID_ Click
DoCmd.OutputTo acOutputReport, "AlphaListi ng", acFormatXLS, , True
Exit_cmdActiveL istByEmployeeID _Click:
Exit Sub
Err_cmdActiveLi stByEmployeeID_ Click:
MsgBox Err.Description
Resume Exit_cmdActiveL istByEmployeeID _Click
End Sub
the problem is that when the reports are being exported, data such as dates are not displayed properly on excel. the dates are converted into texts. fonts do also vary. how can i be able to format the excel spreadsheet so that the reports will be shown properly?
thanks in advance...
Comment