Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

out of range error

Status
Not open for further replies.

blkm74

Programmer
Jul 23, 2002
11
MO
I am writing a form contains master and a detial grid. the grid contins a lineitem, item and unit tables.

3 tables are follow:
lineitem table: order_no, line_no, item_no, qty
item table: item_no, description, unit_code
unit table: unit_code, description.

the presentation of grid is
-------------------------------------------------------
item_no | item desc. | unit desc. | qty | price
-------------------------------------------------------

When I change the item_no of existing record, an error msg "out of range" will be prompted. But when I clear the controlsource of unit_desc column, it works.

It seems when the pointer of item table is moved but the pointer of unit table doesn't move correctly.

Please help me!
Thanks!
 
Usually when you get a "record out of range" error, the recno() is -1. For example when you append blank in a buffered table, at that point the recno() is -1 (until the record is saved), which you cannot use as a reference for that record.
 
it sounds like that you are not using an updatable view for this grid. I suggest that you use table buffering and an updatabel view.

Attitude is Everything
 
It sounds like you have a relation set from the lineitem table into the item and unit tables. If you do, you need to update the child tables' related fields first, then the parent or the internal SEEK will go out of range.

Dave S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top