I would like to give in a code for an article in a subform. When I double click on this field I open the form products. If I copy the code from the article, close the product form and paste this code into the subform then the event after update works. If I use a code in the product form to double click on th code, instead of copy it, place this code into the subform (using a code in the form products), then the event after update doesn't work. What is wrong?
Code from the product form
Private Sub Code_DblClick(Cancel As Integer)
On Error GoTo Err_Code_DblClick
gSelectieCode = Code
DoCmd.Close
If IsLoaded("frmKassa") Then
Forms![frmKassa].[frmKassa_Subformulier].Form!.
Code from the product form
Private Sub Code_DblClick(Cancel As Integer)
On Error GoTo Err_Code_DblClick
gSelectieCode = Code
DoCmd.Close
If IsLoaded("frmKassa") Then
Forms![frmKassa].[frmKassa_Subformulier].Form!.
Code:
= gSelectieCode
Forms![frmKassa].[frmKassa_Subformulier].Form!.[Code].Requery
End If
Forms![frmKassa].[frmKassa_Subformulier].Form!.[Prijs] = Forms![frmKassa].[frmKassa_Subformulier].Form!.[PrijsPerEenheid]
DoCmd.RunCommand acCmdSaveRecord
DoCmd.GoToRecord , , acNewRec
Exit Sub
DoCmd.Close
Exit_Code_DblClick:
Exit Sub
Err_Code_DblClick:
MsgBox Err.Description
MsgBox "Dubbelklikken mag enkel bij het kiezen van een product voor de verkoop!", _
vbCritical, "Melding"
End Sub