Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

event after update problem

Status
Not open for further replies.

fedum

Technical User
Mar 22, 2004
104
BE
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:
 = 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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top