Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 3 & some odd behavior in forms
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
VFP 3 & some odd behavior in forms
Miscellaneous
Thread ID:
00054910
Message ID:
00054910
Views:
74
I have a v. 3 app which has a form which is behaving oddly. Though I have a Thisform.Case_no.SetFocus at the end of an add routine, it only sets focus on the case # the first time it adds. After the user adds his first record, what object has the focus is anybody's guess--it's different every time. The odd thing is, when I set step on to force it to show me the code so I can step through, it never has a problem. It always ends up in the correct field. So I can't debug it if I can't make it recur while I'm looking at the code.

While I was debugging this little problem, I would test it by adding one record, saving it, then adding another. Now it's not appending a blank to the table the second time around--it's giving me the same record again! Again, if I set step on, it works beautifully.

This is a mature form which has been at the client site for several months now with no issue. She only just found out about the setfocus thing because she happened to have several clients to add recently, which is unusual.

One more thing: I put a routine into the GotFocus and the LostFocus of each object (most of them text boxes) which changes the background color of the object so the user can see which field he's in. The GotFocus makes it blue, and the LostFocus turns it back to White. When the user adds the second time, the case # field turns blue (as though it has focus), and the field that actually has focus turns blue too. The Case # never turns back to white unless you click in there and tab or otherwise get out of the field, thereby firing the lostfocus.

I'm afraid to recompile & deliver (other changes) in case there's corruption or some kind of code thing I'm not looking at. Any suggestions?

JR
CLARC Services, Inc.
3500 Tamiami Trail
Port Charlotte, FL 33952
www.clarc.com
(941) 743-0108
(800) 246-5488
Next
Reply
Map
View

Click here to load this message in the networking platform