Hi everybody!
my code is :
************************************************** ***********
Private Sub Form_Open(Cancel As Integer)
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim myvehicule As String
myvehicule = Forms![Mapping]![Immatriculation]
Set db = CurrentDb
Set rs = db.OpenRecordset("Select repairnumber From vehicule Where
'Immatriculation'=' " & myvehicule & " ';")
rs.Edit
rs.Fields("repairnumber").Value = rs.Fields("nrepairnumber").Value
+ 1
rs.Update
Forms![new reparation]![repairnumber] =
rs.Fields("numeroreparation").Value
rs.Close
Set rs = Nothing
Set db = Nothing
End Sub
************************************************** **********
and I get the #3021 error.
Does anybody see where the trouble is ??????
thanks a lot