Click to See Complete Forum and Search --> : How to change row in a table (Access2000)


Nath
January 24th, 2000, 07:38 AM
Hello everybody

my question is I've got a table that's called "T_Donnee" and in that table I
need to add some information related to the automatic number,
("Number", "CieName", "Adress", "Town", "TimeWorked", "TimeTraveled")
the "TimeWorked" and the "TimeTraveled" are the two criteria that I need to add the information and it as to follow the "Number". I'm able to add the first
row but I'm not able to change to the next rows, it doesn't follow
the "Number". Here is my code that I've done



private Sub ImageDisquette_Click()
on error GoTo Err_ImageDisquette_Click

Dim dbAppelService as Database
Dim ptDonnee as DAO.Recordset

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

set dbAppelService = CurrentDb
set ptDonnee = dbAppelService.OpenRecordset("T_Donnee", dbOpenDynaset)

If IsNull(me![Technicien]) Or IsNull(me![DateFermeture]) then
MsgBox ("Vous devez entrer votre nom " & (Chr(13) & Chr(10)) & "et la date de fermeture" & (Chr(13) & Chr(10)) & "(cliquez 1 fois dans le champs)")
else
If IsNull((TransportPourCalcul2) And (SurPlacePourCalcul2) And (AtelierPourCalcul2) And (TravailCalcul2) And (VraiTotalTravailCalcul2) And (VraiTotalKmCalcul2) And (SousTotalCalcul2) And (AvecTPSCalcul2) And (AvecTVQCalcul2) And (GrandTotalCalcul2)) then

ptDonnee.MoveFirst
ptDonnee.Edit

ptDonnee!TransportPourCalcul2 = TransportPourCalcul
ptDonnee!SurPlacePourCalcul2 = SurPlacePourCalcul
ptDonnee!AtelierPourCalcul2 = AtelierPourCalcul
ptDonnee!TotalTravailCalcul2 = TotalTravail
ptDonnee!VraiTotalTravailCalcul2 = VraiTotalTravail
ptDonnee!VraiTotalKmCalcul2 = VraiTotalKm
ptDonnee!SousTotalCalcul2 = SousTotal
ptDonnee!AvecTPSCalcul2 = AvecTPS
ptDonnee!AvecTVQCalcul2 = AvecTVQ
ptDonnee!GrandTotalCalcul2 = GrandTotal

ptDonnee.Update
End If
ptDonnee.MoveNext
End If

'ptDonnee.Close
'dbAppelService.Close

Exit_ImageDisquette_Click:
Exit Sub

Err_ImageDisquette_Click:
MsgBox Err.Description
resume Exit_ImageDisquette_Click

End Sub




Can somebody help me It's the only thing left to do in my data base and it
would be greatly apriciated.

Thank you

nath :)
begginer programmer
Access97/2000 and VB