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!

Major problem in ES Flex

Status
Not open for further replies.

pronet74

MIS
Mar 9, 2004
192
US
In about 2 weeks I will do my final conversion from 7.5 to ES. I have ES running on a backup server with our data on it so users can get accustomed to the changes.

My problem is, I am making a mod for my users. It's a OE->PO # Line mod. Where upon putting an OE for a 'special item' (qty to ship=0 & reorder_lvl=0) then we want a PO created with the same # as the OE.

I have the OE writing to a text file which is then picked up by the PO when the screen is opened. Everything works find except the damn listview box. Once the status combo box has focus I have it automatically going to item.text However doing this with the item.setfocus will not work. I just highlights the top row of the listview box.

This is a bug (which has been since last year). Their programmer's help is of basically no use. He suggests the putfocus api command & a timer api call. However I still get the same response as just using item.setfocus.

Have any of you had any experience with getting a field inside a listview box gaining focus? I'm going nuts here and they want $3,000 to do this mod. This is the only thing that's keeping me held up. Any advice?
 
Why are you not just writing a sql insert statement directly to the PO order header and the PO order Line?

Andy

BTW that is my $1500 answer :)

Andy Baldwin

"Testing is the most overlooked programming language on the books!
 
I'm with Andy, write direct.

As for your particular issue I resolve problems with SetFocus by doing the following:
1. Create a small application that has no user interface that runs the SendKeys VB command or use the API if you prefer for the window that currently has focus. You can pass the sendkeys character and wait delay parameters to the application which will run the sendkeys command and then close itself.
2. Shell out to the out of process SendKeys application which will run the command in the window that currently has focus (Macola if you code it right).

This has worked well since the first days of Flexibility in Macola Progression whenever the SetFocus command is not sufficient. Running the SendKeys API from within VBA doesn't quite work all the time because while VBA is running the Macola code is paused and waiting for control to be passed back to Macola.

Scott Travis
infoSpring, LLC.
 
I finally got it to work. The problem with writing a direct SQL statement is finding all the other queries it runs when putting info into the screen.

I had to use the putfocus API call. I can post the code if you wish, it's not pretty but it works. I also have two other mods done. One is to track who put the order in by thier network logon name, and the second one is when a user change the 'ship date' it will ask if you want to change all the req. ship dates in each line item & will do so if the user chooses yes.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top