How do I get the event "After Update" to work?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to copy this command from a sample to a form that I am creating.
It will not work with mine. I either get a run time error, or it does
nothing at all.

Private Sub ProductID_AfterUpdate()
Me![UnitPrice] = Me![ProductID].Column(2)
End Sub
 
cp said:
I am trying to copy this command from a sample to a form that I am
creating. It will not work with mine. I either get a run time error,
or it does nothing at all.

Private Sub ProductID_AfterUpdate()
Me![UnitPrice] = Me![ProductID].Column(2)
End Sub

Since you don't tell us what run-time error you actually get, we're
force to take shots in the dark. The most obvious questions are:

1. Are there controls named "ProductID" and "UnitPrice" on your form?

2. Is the control named "ProductID" a combo box or list box?

3. Does the control named "ProductID" have at least three columns?
ProductID.Column(2) is the third column.
 
Back
Top