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 26 27 28 29 30 31 32
|
Private Sub CocherIR2_Click()
If Me.Cocher Then
call case_cocher
End If
End Sub
public function case_cocher()
dim sql as string
dim rdsfiles as recordset
dim dbs as database
Set dbs = CurrentDb
SQL = "SELECT... ";"
''' Open the recordset
Set dbs = CurrentDb
Set rdsfiles = dbs.OpenRecordset(strSQL, dbOpenSnapshot)
''' Exit si ton enregistrement n'existe pas, who knows ?
If rdsfiles.EOF or rdsfiles.BOF Then
exit function
else
DoCmd.RunSQL "UPDATE ..... where ta condition;"
end if
end function |