![Citation](https://forum.developpez.be/images/misc/quote_icon.png)
Envoyé par
Jeannot45
Je n'ai donc pas trop compris ton problème.
Pourrais-tu nous en dire un peu plus sur ton état :
Que doit-il afficher ?
IdContatto représente quoi au juste ?
A quoi idContatto est-il lié ?
Pourrais-tu mettre un aperçu de ta base ?
Bonne continuation
alors dans le formulaire il y a la query uscite_comande avec comme champs:
SELECT Uscite.Dataconsumazione, Uscite.OraConsumazione, Uscite.IDContatto, ([Nome]+' '+[Cognome]) AS Cliente, Uscite.ID_Art, Articoli.Descrizione, Uscite.Quantità, prezzo_bar, prezzo_ss, ([prezzo_bar]+[prezzo_ss]) AS Totale, Uscite.Pagato
dans mon report il y a la query avec comme champs:
SELECT Uscite.Dataconsumazione, Uscite.OraConsumazione, Uscite.IDContatto, ([Nome]+' '+[Cognome]) AS Cliente, Uscite.ID_Art, Articoli.Descrizione, Uscite.Quantità, Articoli.Prezzo, prezzo_bar, prezzo_ss, ([prezzo_bar]+[prezzo_ss]) AS totale, Uscite.Pagato
donc ce que je veux est que quand je clic sur le bouton stampa du formulaire il s'ouvre le report où l'idcontatto.formulaire=idcontatto.report
code bouton:
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
| Private Sub PAGATO_SENZA_STAMPA_Click()
On Error GoTo Err_PAGATO_SENZA_STAMPA_Click
'CurrentDb.Execute "update Uscite set Pagato=1 where IDContatto in (select IDContatto from Dettagli_Comande_per_cliente)"'
Dim stDocName As String
Dim StLinkCriteria As String
stDocName = "Saldo credito cliente"
StLinkCriteria = "[IDContatto]=" & "'" & Me![IDContatto] & "'"
DoCmd.OpenReport stDocName, acPreview, , StLinkCriteria
Exit_PAGATO_SENZA_STAMPA_Click:
Exit Sub
Err_PAGATO_SENZA_STAMPA_Click:
MsgBox Err.Description
Resume Exit_PAGATO_SENZA_STAMPA_Click
End Sub |
Partager