1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| Private Sub Commande283_Click()
On Error GoTo Err_Commande283_Click
Dim stDocName As String
stDocName = "Membres_commune (table)"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_Commande283_Click:
Exit Sub
Err_Commande283_Click:
MsgBox Err.Description
Resume Exit_Commande283_Click
Dim strFileName As String
Dim strDate As String
strDate = Format$(Now(), "yyyymmdd")
strFileName = "D:\Mes Documents\Musculation\Autocad\Muscu - Liste des membres (commune)_" & strDate & ".xls"
If Dir(strFileName, 0) <> "" Then
If MsgBox("On écrase le fichier existant ?", vbQuestion + vbYesNo) = vbYes Then
DoCmd.OutputTo acOutputTable, "Membres_communes (table)", acFormatXLS, strFileName, True
End If
End If
End Sub |
Partager