My client has certain products that need an export license
when shipped to certain counries. They want a message printed on the Pick Ticket when such a license is required with no user action required.
I have made routines that determine when such a license is required using Flexibility on the Order entry screen. It uses the values of item number and ship-to country. From this screen I want to enter the message into User_def_Fld_5 of the OEORDHDR_SQL table from which it can be entered on the pick ticket.
When I try to update the field directly using code and ADO I get a "record locked" error. Does MACOLA lock the OEORDHDR_SQL table for updating from Flex? My routines can open and read from the table OK, but I can't update, even after trying different cursor and lock options in the code.
My other approach is to add the user defined field to the Screen, but here I am having trouble setting the focus to the text box so that it can be updated. I have read other posts on this forum and have used a global variable and plan to somehow set focus to the new text box to set its value from the VBA code.
I have one work-around: I use the code to enter the order number into another table in an ACCESS database. Then from the Pick Ticket screen I run a Flex routine that uses this table to update the user defined field in OEORDHDR_SQL
before the pick tickets are printed.
I would prefer to have everything done in the order entry process. Any ideas how I can update this field from order entry?
Thanks,
Jerzy
when shipped to certain counries. They want a message printed on the Pick Ticket when such a license is required with no user action required.
I have made routines that determine when such a license is required using Flexibility on the Order entry screen. It uses the values of item number and ship-to country. From this screen I want to enter the message into User_def_Fld_5 of the OEORDHDR_SQL table from which it can be entered on the pick ticket.
When I try to update the field directly using code and ADO I get a "record locked" error. Does MACOLA lock the OEORDHDR_SQL table for updating from Flex? My routines can open and read from the table OK, but I can't update, even after trying different cursor and lock options in the code.
My other approach is to add the user defined field to the Screen, but here I am having trouble setting the focus to the text box so that it can be updated. I have read other posts on this forum and have used a global variable and plan to somehow set focus to the new text box to set its value from the VBA code.
I have one work-around: I use the code to enter the order number into another table in an ACCESS database. Then from the Pick Ticket screen I run a Flex routine that uses this table to update the user defined field in OEORDHDR_SQL
before the pick tickets are printed.
I would prefer to have everything done in the order entry process. Any ideas how I can update this field from order entry?
Thanks,
Jerzy