Bonjour à tous,
J'ai un problème de object name invalid or no longer set
mon code marche une première fois mais la seconde fois mon objet form n'est plus valide voici le code
merci pour votre aide
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 Set wrkCurrent = DBEngine.Workspaces(0) Set dbsDardo = CurrentDb Set rstFacture = dbsDardo.OpenRecordset("TFACTURE", dbOpenDynaset) Set rstFacDetail = dbsDardo.OpenRecordset("TFACTUREDETAILS", dbOpenDynaset) Forms![PRINCF-COMMANDE]![F-DETAIL].Form.Recordset.MoveFirst With Forms![PRINCF-COMMANDE]![F-DETAIL].Form.RecordsetClone .MoveLast reponse = .RecordCount End With rstFacDetail.MoveLast For x = 1 To reponse rstFacDetail.Delete rstFacDetail.MovePrevious Next x rstFacture.MoveLast rstFacture.Delete Me.Requery ...... rstFacture.Close rstFacDetail.Close dbsDardo.Close wrkCurrent.Close Set rstFacture = Nothing Set rstFacDetail = Nothing Set dbsDardo = Nothing Set wrkCurrent = Nothing
Partager