Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Lostfocus calling Thisform.Refresh
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Lostfocus calling Thisform.Refresh
Miscellaneous
Thread ID:
01465714
Message ID:
01465714
Views:
134
Hi Gang!

A fellow programmer asked me about this, and I wasn't able to help him much on this....

He has a form, which has a textbox and a button to the right of it.

In the textbox, he has this code for the LOSTFOCUS of the textbox...
IF EMPTY(this.value)
            NODEFAULT
ELSE
            IF LEFT(this.Value,1) = ';'
                        this.Value = SUBSTR(this.Value,2)
            ENDIF

            IF ATC('=',this.value) > 0
                        this.Value = SUBSTR(this.value,1,ATC('=',this.value)-1)
            ENDIF

            Thisform.Refresh

            thisform.cmdget_accounts.click()
ENDIF
The cmdget_acccounts is the button to the right of the textbox.

When he scans in a card, or types in the card number, in the textbox, when he presses (ENTER), he wants the code to execute, and IMMEDIATELY show the substring of the scanned or typed in value, THEN process the number in the cmdget_accounts.click method.

What happens is that when he presses (ENTER), there is about a 3 second delay, THEN the substring shows up in the textbox (was expecting it to immediately show up). It looks like it refreshes the form AFTER the cmdget_accounts.click processes.

What do you thing? Is Thisform.Refresh allowed IN the Lostfocus?

How would you recode this?

Thanks!
Tommy Tillman A+ NetWork+ MCP
Next
Reply
Map
View

Click here to load this message in the networking platform