Hi all,
Sorry to bother, but this one is a bit weird. I'm trying to open a specific order document through vb-code. As there appears to be no other option than through the menu's, I'm trying this code:
sbo_app.ActivateMenuItem (ORDERMENU)
sbo_app.SendKeys ("^F") '<= enter search mode
sbo_app.SendKeys (strValue) 'orderno
sbo_app ("")
The resulting form is indeed the sbo-orders form, in search-mode, but the ordernummer is not entered (it is there in code). The cursor is blinking inside the correct screen-item.
I even tried a 500 milsec pause and a 0-100 doevents loop before sending the orderno.
Any suggestions? Is there a better solution?
Thanks,
Jacques
Hi Jacques,
Perhaps you can use this sort of code :
sbo_app.ActivateMenuItem (ORDERMENU)
Set vForm = SBOApplication.Forms.GetFormByTypeAndCount(139, 0) <== set vForm as new opened Order Form
vForm.Mode = fm_FIND_MODE <== enter order form find mode
Set vEditText = vForm.Items("8").Specific
vEditText.String = strValue <== Rather than sending Order no with sendkeys, send Order No as String Value to Edit Text Control in Order form
vForm.Items("1").Click <== Click Find Button
Arief S
Add a comment