i'm not certain, but i think the access web
http://www.mvps.org/access has
an answer
else try
http://www.lebans.com
Pieter
Biz Enhancer a écrit :
Tools/Options/Edit-Find uncheck "Confirm Action Queries" (Not really good
practice)
Better to place suppression around the export command in VBA
DoCmd.Setwarnings False
'do your export here
DoCmd.SetWarnings True
Regards,
Nick
Thanks Nick, but it still opens a window each time it writes the file, may
be I did not get it due to my poor english
Here is the function I wrote, including your suggestion :
Function export_compte(lot As Integer)
Dim FileName As String
Dim strLot As String
strLot = CStr(lot)
While Len(strLot) < 5
strLot = "0" & strLot
Wend
FileName = "C:\Parc\site\prive\president\lots\" & strLot & ".rtf"
DoCmd.SetWarnings False
DoCmd.OpenForm "Form_PropriétaireSel", , , , , acHidden
Forms!Form_PropriétaireSel!lot = lot
DoCmd.OpenReport "Etat_Compte_Saisies", acViewPreview, , , acHidden
DoCmd.OutputTo acOutputReport, "Etat_Compte_Saisies", acFormatRTF,
FileName, False
DoCmd.Close acForm, "Form_PropriétaireSel"
DoCmd.Close acReport, "Etat_Compte_Saisies"
DoCmd.SetWarnings True
End Function