After Update Puzzle

M

Michael

I use the "After Update" code below and am having a puzzling problem.
With certain "Item Codes", it doesn't update. I'm trying to figure
out why.

Example "Itemcodes" that do work:
"Barrister"
"NotebookLabor"

Example "ItemCodes" that do not work:
"Rhombus"
"LaptopLabor"

Here is the code I'm using:

Private Sub ItemCode_AfterUpdate()
Me.ItemCode.Requery
Me.Price = Me.ItemCode.Column(1)
Me.ItemDescription = Me.ItemCode.Column(2)
Me.ItemType = Me.ItemCode.Column(3)
End Sub
 
J

John W. Vinson

I use the "After Update" code below and am having a puzzling problem.
With certain "Item Codes", it doesn't update. I'm trying to figure
out why.

Example "Itemcodes" that do work:
"Barrister"
"NotebookLabor"

Example "ItemCodes" that do not work:
"Rhombus"
"LaptopLabor"

Here is the code I'm using:

Private Sub ItemCode_AfterUpdate()
Me.ItemCode.Requery
Me.Price = Me.ItemCode.Column(1)
Me.ItemDescription = Me.ItemCode.Column(2)
Me.ItemType = Me.ItemCode.Column(3)
End Sub

Ummm...

We can't see your database.

We have no way to tell what's in the three columns for these various values,
what isn't updating, what happens when you select Rhombus (nothing? Error
message? Monitor catches fire?)

What's the RowSource for the combo (post the SQL and some sample data). What's
the Bound Column? You were aware that the Column property is zero based, I
take it?

More info please!
 
E

elbyc

I use the "After Update" code below and am having a puzzling problem.
With certain "Item Codes", it doesn't update.  I'm trying to figure
out why.

Example "Itemcodes" that do work:
"Barrister"
"NotebookLabor"

Example "ItemCodes" that do not work:
"Rhombus"
"LaptopLabor"
0
Here is the code I'm using:

Private Sub ItemCode_AfterUpdate()
Me.ItemCode.Requery
Me.Price = Me.ItemCode.Column(1)
Me.ItemDescription = Me.ItemCode.Column(2)
Me.ItemType = Me.ItemCode.Column(3)
End Sub

Ok - wild stab in the dark, but by any chance did you mean to
reference columns 0 through 3? Column numbers start at 0.
 

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