Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Event Firing Order
Message
From
15/02/1997 19:01:00
Paul Gillenwater
Raytheon Engineers & Constructors, Inc
Louisville, Kentucky, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Event Firing Order
Miscellaneous
Thread ID:
00020691
Message ID:
00020691
Views:
78
I need some help with the event firing order in the following situation.

I have a form with one pageframe with two pages. On the 2nd Page, I have two grids. In at least one of the columns on each of the grids, I have two objects in a column, one is the default textbox, and the other is a dropdown combo box.

The idea is to switch from a textbox to a dropdown combo box, (initially displaying the record that was shown in the textbox), when it receives the focus. The user can select any record in the table. When the combo box loses the focus, a calculation provides an update for another column in the grid, updates the display, and switches back to a textbox.

The two grids are part of a many-to-many data environment. The first grid allows the user to choose any one of a thousand or so Work Orders. The combo box is used to chose the Work Order Number. The second grid is a cost calculator....Look up the Craft Labor Code with the trusty dropdown combo, then update the labor rate, and the labor cost. Another column represents Manhours Worked. Manhours Worked * the Labor Rate just looked up with the combo box = Labor Cost.

The problems are;
1. No amount of fiddling I've done will refresh (redisplay) the column (cell) that is the result of the calculation, unless I force a table update. I'm using a "Replace with" statement to do that.

2. The Craft Labor Code combo .LostFocus event fires two, and sometimes three times. One or more of those firings will be before the object has "lost focus".

Yes, I have some code in the GotFocus and LostFocus events. I'm trying to understand why the .LostFocus event fires multiple times, hence the need to understand the firing order within the grids.

Thanks,

Paul
Reply
Map
View

Click here to load this message in the networking platform