Normal Topic Tableview - adding records (Read 407 times)
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Tableview - adding records
Feb 14th, 2009 at 9:31pm
Print Post Print Post  
goal:  add a new line item to a subform (tableview) and have the Focus then be in the first field on the new line (record) ...

Subform "TruckLines" has three fields TLQty, TLlineItem, ItemDesc.

Here is my current programming in ItemDesc OnElement Exit:

// add a new line to TruckLines

var  nn as int
IF @add then
     {
           nn = @FormNewRecord("TruckLines")
           ThrowFocus(TLQty)
     }

Question:  programming that moves the focus to the new record in tableview?
  

Larry
Back to top
IP Logged
 
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: Tableview - adding records
Reply #1 - Feb 15th, 2009 at 4:47pm
Print Post Print Post  
I used the following code to work for me (but if someone has a more elegant solution, I'm all ears).

var vNav as Int      
     
If @Add Then
     {
           vNav = @SelectTreeItem("Add Data Menu!Navigation!Advance Record (F10)")
           ThrowFocus(TLQty)
     }
  

Larry
Back to top
IP Logged