C
CDM
I'm trying to synchronize two forms using withevents, but nothing happens
with the command line 'raiseevent'. Here is my code:
MainForm
Public Event NewCustomer(strCustomer_Id as string)
Private sub txtCustomer_Id_afterupdate
RaiseEvent NewCustomer(me!txtCustomer_Id)
2ndForm
Dim WithEvents frm as Form_MainForm
Private Sub Form_Load
Set frm = Form_MainForm
Private sub frm_NewCustomer(mCustomer_Id as String)
'Update 2ndForm
My problem is that nothing happens with RaiseEvent in the MainForm.
Execution goes on as if this line was just a comment. Any ideas?
with the command line 'raiseevent'. Here is my code:
MainForm
Public Event NewCustomer(strCustomer_Id as string)
Private sub txtCustomer_Id_afterupdate
RaiseEvent NewCustomer(me!txtCustomer_Id)
2ndForm
Dim WithEvents frm as Form_MainForm
Private Sub Form_Load
Set frm = Form_MainForm
Private sub frm_NewCustomer(mCustomer_Id as String)
'Update 2ndForm
My problem is that nothing happens with RaiseEvent in the MainForm.
Execution goes on as if this line was just a comment. Any ideas?