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

C

cp

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
 
D

Dirk Goldgar

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top