Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What gives???
Message
From
24/01/1997 15:21:01
 
 
To
22/01/1997 16:58:24
Bill Gravell
Indoor Purification System
Menifee, California, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00018007
Message ID:
00018348
Views:
34
Ah.....that might be the problem. One of the things I have found (much to my chagrin) is that having the Debug and Trace windows active while running a form will change the order in which events happen. One of the ways I found to get around it was to either put a 'suspend' where I thought the problem was occuring, or using the debug window to place a breakpoint where I knew the value of a variable was getting changed. that way, I could get the event order firings closer to that of "real" time.



>>>Here is the situation: System to track accidents. During the data entry process, there is a form to enter all the specific data of the accident (accmgt). That form is created and during the activate, a 2nd form is called to search for the employee (search). During the search phase, the employee SSN is stored, and all the pertinent information about the employee is displayed on the first form (accmgt). In the accident date field valid method, I put a duplication check routine to check to see if, based on the ssn and date of accident, the accident had already been entered into the system.
>>>
>>>Problem: As the system creates accmgt and calls search in the activate method, it evaluates the valid in the accident date field, even though the textbox had not yet recieved focus. I even moved the code to the lostfocus method, but it still is triggered. I thought that the valid only triggered during the actual entry and attempted exit from the text box, and the same for the lostfocus.
>>>
>>>What am I missing? anybody help???
>>
>>Where is the second (the employee info) screen being called from? From the sounds of it, it's being called from the accident date field(?) If this is the case, then it makes sense that the lostfocus is firing when you leave the field. That field has just lost the focus of the cursor. If data has been entered in the date field, then the valid WILL be fired on leaving the field.
>
>It is being called in the activate method of the very top level of the accmgt form. It doesn't appear, while I am in debug, that the cursor is getting positioned in that field yet.
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Previous
Reply
Map
View

Click here to load this message in the networking platform