After Update Puzzle

  • Thread starter Thread starter Michael
  • Start date Start date
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
 
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!
 
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.
 
Back
Top