Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Prompting for locked records
Message
From
19/02/1999 17:34:25
 
 
To
19/02/1999 16:25:38
Noman Aftab
Embry-Riddle Aeronautical University
Daytona Beach, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00189490
Message ID:
00189554
Views:
10
>It doesn't let me edit a record if another user is editing but it doesn't disable the controls. Can you please shed some light on WHEN procedure.

Normal,

The When() method of each control type (any control type that can be linked to a table field has a When() method) is triggered just before a control gains focus, and determines whether the control will be permitted to get focus by returning .T. (can get focus) or .F. (cannot get focus).

You can used this method to prevent a control linked to a locked record from getting focus, for example,
*-- myTextBoxControl.When()

IF ThisControlSourceIsLocked()
   Return .F.
ENDIF

RETURN .T.
ThisControlSourceIsLocked() is a routine that tests whether another user has locked the record. There are a variety of ways to do this. I suggest you check the KB & FAQ here on the UT and the MS KB at http://support.microsoft.com/support/c.asp?A=T&T=B&M=F

regards,
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.com

No trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.
Previous
Reply
Map
View

Click here to load this message in the networking platform