5 replies
by rcole
This code sample will give you many options to export to. Put it in the code module of a button and replace the appropriate names with your own.
Private Sub Ctl2F119AToFile_Click()
On Error GoTo Err_Ctl2F119AToFile_Click
DoCmd.OpenForm "Quarterly Utilization Form"
DoCmd.OpenQuery "Quarterly Utilization Temp Storage Update", acViewNormal, acEdit
****DoCmd.OutputTo acReport, "Quarterly Supply Utilization Report" **** This is the one that does the exporting..
DoCmd.CLOSE acForm, "Contract Information", acSaveNo
Call ResetYear
Exit_Ctl2F119AToFile_Click:
Exit Sub
Err_Ctl2F119AToFile_Click:
MsgBox Err.Description
Resume Exit_Ctl2F119AToFile_Click
End Sub
by dredd
by andrewf
Personally I would use the Transfertext Command
DoCmd.TransferText [transfertype][, specificationname], tablename, filename[, hasfieldnames][, HTMLtablename]
example follows
DoCmd.TransferText acExportDelim, "Standard Output", _
"External Report", "C:\Txtfiles\April.doc"
If you look this up in the help you should find what you want
Andrew Fraser
by dredd
by dredd
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending