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 33 34 35 36 37 38 39 40 41 42 43
| Option Compare Database
Private Sub chkAstuce_open(Cancel As Integer)
Randomize
Random = Int((lngMax - lngMin + 1) * Rnd(100) + lngMin)
'Random = ForceAlea(lngMin, lngMax, 0)
Me!Compteur.SetFocus
DoCmd.FindRecord Random
Me!lblAstuce.Caption = Me!Astuce
Me!chkAstuce = GetIniParam(CurrentProject.Path & "\Config.ini", "OPTION", "ASTUCE")
End Sub
Private Sub cmdNext_Click()
On Error GoTo Err_cmdNext_Click
DoCmd.GoToRecord , , acNext
Me!lblAstuce.Caption = Me!Astuce
Exit_cmdNext_Click:
Exit Sub
Err_cmdNext_Click:
DoCmd.GoToRecord , , acFirst
Me!lblAstuce.Caption = Me!Astuce
Resume Exit_cmdNext_Click
End Sub
Private Sub B_fermer_Click()
On Error GoTo Err_B_fermer_Click
DoCmd.Close
Exit_B_fermer_Click:
Exit Sub
Err_B_fermer_Click:
MsgBox Err.Description
Resume Exit_B_fermer_Click
End Sub |
Partager