saving report in excell (1 Viewer)

S

Stud_access

Guest
Hi, i need help..i have this form which includes yr and comp_id, when the user chooses a specific comp_id and yr a report will be generated showing the values under the chosen yr and comp_id, I made a button for saving the report in excell and i put this code

Private Sub Command7_Click()
On Error GoTo Err_Command7_Click

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "FQuery2", "C:\temp\working folder\FRS_DATA_TEMP.xls"
Application.FollowHyperlink "C:\temp\working folder\FRS_DATA_TEMP.xls"

But for some reason when i tested it, its giving me an error stating "too many fields define" what does this mean, sorry im very new in access..

can anybody help me plz...
thank u
 

Sammy B

Registered User.
Local time
Yesterday, 21:54
Joined
Oct 31, 2005
Messages
97
I am not sure what you are trying to accomplish with your code, but if you create a standard Access report in preview mode you can then choose File\Save As and then choose Excel as a file type, give it a name and it will save in Excel format.

Sam
 

Users who are viewing this thread

Top Bottom