Insert Record w/out Renaming Prompt.....

Hi all… 3.70 here. I have a table called ARP Scanned Inventory. 3 columns: Lot No., Item No., and Qty. When the Lot No. is entered it pulls over the Item No. and Qty from the Item Ledger Entry table. That all seems to be working fine. I am now making a form that will let the users enter into that table. The form works fine…and I have made a button to assist in inserting a new record into the table. That seems to work…but when you leave the field of the newly enterd record, it asks if you want to “Rename the Record”. If I say yes it enters the info just fine. Here is the code that I have behind the button for the insert: NewRec On Push() CLEAR(InvScan); InvScan.INIT; “Lot No.” := ‘’; InvScan.INSERT(TRUE); The InvScan is basically a variable pointing to the table I am using for the form. My question is how do I get it to stop asking about the rename record? If I use F3 it does not prompt me for that. I need this funtionality because we are using handhelds without the F3 button. Any help will be appreciated.

I assume the primary key is your Lot No.? Then you are entering the record with Lot No. = ‘’ and afterwards change the Lot No.? That results in a rename… Can’t you insert the record after having the value of the Lot No.?

Ok…that seemed to do the trick. I created a column called Entry No. (the primary key) and now it lets me insert new records without renaming. Is there any code that would not let a user move on to a new line until there is information in the one that was just created? We are having a problem with blank records coming in…and I cannot tell if they just hit the New Record button twice or if the pallet they scanned is not in the Item Ledger Entry table. Anyone? JP

You can put Yes in the NotBlank property of the field(s) that you insist should be filled out. Alternatively add some code to the OnModify() trigger, e. g.TESTFIELD("Lot No.")orIF "Lot. No." = '' THEN ERROR('My errortext..');BTW you don’t need both CLEAR and INIT in your Insert code.

Thanks for the tip…works great!! Now we can scan our physical inventory rather then hand counting product. JP

or you use the DELEAYEDINSERT Property of your main form