Hi everybody!
my code is :
*************** *************** *************** *************** *
Private Sub Form_Open(Cance l 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.OpenRecordse t("Select repairnumber From vehicule Where
'Immatriculatio n'=' " & myvehicule & " ';")
rs.Edit
rs.Fields("repa irnumber").Valu e = rs.Fields("nrep airnumber").Val ue
+ 1
rs.Update
Forms![new reparation]![repairnumber] =
rs.Fields("nume roreparation"). 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
my code is :
*************** *************** *************** *************** *
Private Sub Form_Open(Cance l 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.OpenRecordse t("Select repairnumber From vehicule Where
'Immatriculatio n'=' " & myvehicule & " ';")
rs.Edit
rs.Fields("repa irnumber").Valu e = rs.Fields("nrep airnumber").Val ue
+ 1
rs.Update
Forms![new reparation]![repairnumber] =
rs.Fields("nume roreparation"). 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
Comment