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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB Countinuum, Insert new line

Status
Not open for further replies.

burokio

Programmer
Feb 10, 2003
13
UA
How can I insert new line into the window 'Line_Scroll' of form 'SOP_Entry'?
I have to add new sales transaction from vb code.
Everything goes ok until I try to add line items.
I am filling SOP_Entry form by using series of
MoveToField\SetDataValue operations, but how can I add new line to the Lins_Scroll window?

Now all items are being inserted into the same location, new lines just clear previousely inserted information.

 
Hey !

Anyone answered that question for you ? I have the same problem, so if you know the solution, please pass it along.

Tx
 
From what I remember(I do not have Great Plains installed now, so I cant check) you have to programmatically click "Expansion Button" and then use "Save Button" to save each line item:

Click Expansion button
MoveToField("'Expansion Button 5' of window 'SOP_Entry' of form 'SOP_Entry'")
ExecuteSanScript("run script 'Expansion Button 5' of window 'SOP_Entry' of form 'SOP_Entry';")

For each line item set values and then click "Save" button

for each item
SetValue("'Item Number' of window 'SOP_Item_Detail' of form 'SOP_Item_Detail'", yourValue)
SetValue("'QTY' of window 'SOP_Item_Detail' of form 'SOP_Item_Detail'", yourValue)
...
MoveToField("'Save Button' of window 'SOP_Item_Detail' of form 'SOP_Item_Detail'")
ExecuteSanScript("run script 'Save Button' of window 'SOP_Item_Detail' of form 'SOP_Item_Detail';")
next item


 
Why not just use SendKeys to either tab off the last field on the existing line or use down arrow to move down to the next line.

David Musgrave [MSFT]
Senior Development Consultant
Escalation Engineer
MBS Support - Asia Pacific

Microsoft Business Solutions

Any views contained within are my personal views and
not necessarily Microsoft Business Solutions policy.
This posting is provided "AS IS" with no warranties,
and confers no rights.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top