Trigger an event based on checkbox value in a subform

toumack

Registered User.
Local time
Today, 11:25
Joined
May 14, 2011
Messages
13
Good afternoon,
I have a form named [Formulaire des paiements-clientsCombiné] and a subform named [sbfActiveOrdersPaiements] on which I have 4 fields, one of them being a checkbox named "Combiner"
I have 4 fields in that subform: "Table", "État", "NoComm" and "Combiner"
On the main form, I have a button to pay invoices, right now it is doing the job only for the first order in the subform, regardless if the field "Combiner" is checked or not.
I would like to have that event occurred for all the orders where the checkboxes are checked.
Here is the code on my cmdCompleteOrder:
Code:
Private Sub cmdCompleteOrder_Click()
      On Error GoTo Change_err
If IsNull(Me.Choisir_Type_de_paiement) Then
DoCmd.OpenForm "Message choisir un type de paiement"
Exit Sub
End If
If Me.Texte516 <> 0 Then
DoCmd.OpenForm "Message transaction ne balance pas"
Else
  Me![Réf statut] = Paid_customerOrder
  Me![HeurePayée] = Now()
  Me![Type de paiement] = Me.Choisir_Type_de_paiement
  Me![Type de paiement2] = Me.Choisir_Type_de_paiement2
  Me![MontantFacture] = Me.TotalFacture
  Me![MontantRemise] = Me.Texte514
  eh.TryToSaveRecord
  Me.Requery
End If
 
Change_err:
    If Err = 3101 Then
    Exit Sub
  End If
    If Err = 3162 Then
    Exit Sub
  End If
    If Err = 2950 Then
    Exit Sub
  End If
    If Err = 2467 Then
    Exit Sub
  End If
    If Err = 3167 Then
    Exit Sub
  End If
End Sub

Thank you all for your time
Claude from Quebec
 

Users who are viewing this thread

Back
Top Bottom