Error 2450

  • Thread starter Thread starter Ray Hogan
  • Start date Start date
R

Ray Hogan

Hi,
I have a Form (frmUpdate) and SubForm (subfrmUpdate).
I want the value in control [frmUpdate]![cmbFleetNo] to be copied to
[subfrmUpdate]![txttbltransMcReg] and I am getting Error 2450 when I run the
following code on AfterUpdate in the Form Control.
Private Sub cmbFleetNo_AfterUpdate()

Docmd.Echo True,""
Forms!subfrmUpdate!txttbltransMcReg=Forms!frmUpdate!cmbFleetNo
Docmd.Echo True,""

Thanking you in anticipation.
Rayh
 
Your code looks like it should work, but you probably want it to run on the
"OnChange" or "LostFocus" propoerty of the main form control.
BTW, if you set the relationships between keys of your normalized tables
correctly, you won't need to manually update entries like this.
-Ed
 
Back
Top