After Update Puzzle

  • Thread starter Thread starter Michael Firey
  • Start date Start date
M

Michael Firey

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
 
Further details.....

I just discovered that any "ItemCode" that starts with a "R" or a "L"
doesn't update. I can take a non-working code like Rhombus or
Laptoplabor and add a "Z" to it and it then works (zRhombus &
zLaptoplabor for example). Any idea why it doesn't work?
 
Further details.....

I just discovered that any "ItemCode" that starts with a "R" or a "L"
doesn't update. I can take a non-working code like Rhombus or
Laptoplabor and add a "Z" to it and it then works (zRhombus &
zLaptoplabor for example). Any idea why it doesn't work?

Nope. You have not posted enough information about the underlying structures
for anyone to be able to help.

We'll be glad to help but we need something to work with.
 
More details:

tables involved: Tickets, AccountsReceivables, & ItemCodes.

I use a ticket form with a subform showing account receivables for the
ticket. I use an itemcode field in the accounts receivable subform
with a drop down combo box called itemcode which pulls the item code
from the itemcodes table. There is an "after update" on that field
that uses the code above to auto fill the fields "price",
"itemdescription", and "itemtype". When I use any item code that
starts with a R or a L, the after update does not work. If I use an
item code that starts with letters like Z, B, or N it works. Doesn't
make any sense.
 
More details:

tables involved: Tickets, AccountsReceivables, & ItemCodes.

I use a ticket form with a subform showing account receivables for the
ticket. I use an itemcode field in the accounts receivable subform
with a drop down combo box called itemcode which pulls the item code
from the itemcodes table. There is an "after update" on that field
that uses the code above to auto fill the fields "price",
"itemdescription", and "itemtype". When I use any item code that
starts with a R or a L, the after update does not work. If I use an
item code that starts with letters like Z, B, or N it works. Doesn't
make any sense.

A post of mine seems to have gotten lost.

Please post the SQL view of the combo box's RowSource query, and open that
query in datasheet view and report a few of the records (particularly those
that start with R). Also indicate the combo box's Control Source and Bound
Column.

The one thing that makes me suspicious is the Requery line - it should not be
necessary to requery a combo box after you've selected a row from it.
 
Here is the row source for the combo box:
SELECT FRMQ_ItemCodes.ItemCode, FRMQ_ItemCodes.Cost,
FRMQ_ItemCodes.Description, FRMQ_ItemCodes.ItemType,
FRMQ_ItemCodes.CoreCharge FROM FRMQ_ItemCodes ORDER BY
FRMQ_ItemCodes.ItemCode;

here are some sample R items from the datasheet view of the query:
ItemCode
R-SX0-0000059-000
RB1-8699-000CN
RB1-8945
RB3-0129-020CN
RB3-0161-000CN
RESTOCK
RETAILDEPLOYMENT

Control source: itemcode
bound to column 1

Thanks for your interest.
 
Michael said:
Here is the row source for the combo box:
SELECT FRMQ_ItemCodes.ItemCode, FRMQ_ItemCodes.Cost,
FRMQ_ItemCodes.Description, FRMQ_ItemCodes.ItemType,
FRMQ_ItemCodes.CoreCharge FROM FRMQ_ItemCodes ORDER BY
FRMQ_ItemCodes.ItemCode;

here are some sample R items from the datasheet view of the query:
ItemCode
R-SX0-0000059-000
RB1-8699-000CN
RB1-8945
RB3-0129-020CN
RB3-0161-000CN
RESTOCK
RETAILDEPLOYMENT

Control source: itemcode
bound to column 1

Thanks for your interest.

Itemcode is column zero and cost is column one
 
Back
Top