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 44 45 46 47 48 49
| Dim oRst As DAO.Recordset
Dim Vue As DAO.Recordset
Dim oDb As DAO.Database
Dim Var As Integer
Var = Me.NUME
Set oDb = CurrentDb
Set oRst = oDb.OpenRecordset("SELECT ExportPhotos.DateCliche, ExportPhotos.Latitude, ExportPhotos.Longitude, ExportPhotos.Répertoire, ExportPhotos.Fichier, ExportPhotos.Rang FROM ExportPhotos ORDER BY ExportPhotos.DateCliche;")
Set Vue = oDb.OpenRecordset("SELECT VuePhoto.DatePh, VuePhoto.Photo1, VuePhoto.Photo2, VuePhoto.Photo3, VuePhoto.Latitude, VuePhoto.Longitude FROM VuePhoto WHERE VuePhoto.NOInfo = " & Var & ";")
'boucle sur les enregistrements de VuePhoto
If Vue.EOF = True Then Vue.MoveFirst
oRst.MoveFirst
While Vue.EOF = False
'Passe en mode modification
Vue.Edit
'boucle sur les enregistrement d'ExportPhotos
' If oRst.EOF = True Then oRst.MoveFirst
' While oRst.EOF = False
Vue.Fields("DatePh") = oRst.Fields("DateCliche")
Vue.Fields("Photo1") = oRst.Fields("Répertoire") & oRst.Fields("Fichier")
Vue.Fields("Latitude") = oRst.Fields("Latitude")
Vue.Fields("Longitude") = oRst.Fields("Longitude")
Vue.Update
oRst.MoveNext
Vue.Edit
Vue.Fields("Photo2") = oRst.Fields("Répertoire") & oRst.Fields("Fichier")
Vue.Update
oRst.MoveNext
Vue.Edit
Vue.Fields("Photo3") = oRst.Fields("Répertoire") & oRst.Fields("Fichier")
Vue.Update
Vue.MoveNext
oRst.MoveNext
'Wend
Wend
'Libération des objets
oRst.Close
Vue.Close
oDb.Close
Set oRst = Nothing
Set Vue = Nothing
Set oDb = Nothing |
Partager