Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Field value out of table lookup range

Field value out of table lookup range

Field value out of table lookup range

I have a pushbutton function for a "new order".  Code does all math functions, creates a temp table, clears form, adds another order number (sequential).  I had to re-do form, but did a cut/paste of this pushbutton.  Now getting the "field value out of lookup table range", and table locks.  The math functions operate, the form is cleared, and the new order number posts, but then the table locks and I get error message.

See code below:

method pushButton(var eventInfo Event)
        orderTbl Table
        temp        totalTable
        TCTotal    TCursor
        temp2        Smallint

if self.isEdit() then
    temp.MBOrder = MB_Order_#
    temp.PO = PO_#
    temp.TotalPrice = Total_Price
    temp.Date = Date
    temp.TotalComm = Total_Comm
    temp.EndUser = 0
    temp.Cust = Customer_#
    temp.Vend = Vendor_#

    temp2 = MB_Order_#

    if TCTotal.locate("MB Order #", temp2) then



    MB_Order_#.Value = orderTbl.cMax("MB Order #") + 1

RE: Field value out of table lookup range

I don't think I'd do the final DataPostRecord since the only thing in the new record is the Order#.  

I'd also set the order number in the Insert or NewRecord method, since you'd want new records from any source to set the Order# in the same way.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close