Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LOCATE error
Message
 
To
03/05/1999 09:06:51
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00214516
Message ID:
00214523
Views:
15
You are probably on track to the problem, but I don't want to go to the first record for a particular User_ID. All I want to do in mGoTop() is move the record pointer to the first record in the current table irregardless of any order. According to several articles in Fox Advisor on a SET FILTERED table issue LOCATE by itself instead of Go Top (much faster). I also get the error if I issue SKIP -1 or SKIP 1.

>The oDataLib class is not contained in the form, thus doesn't see the reference to THISFORM.
>
>One way to get around this is to pass the property to the method:
>
>THISFORM.oDataLib.mGoTop(THISFORM.cCurrentUserID)
>
>In mGoTop():
>
>LPARAMETERS tcCurrentUserID
>
>LOCATE FOR User_ID = tcCurrentUserID
>
>HTH
>
>>I have a form that is loaded at runtime via NEWOBJECT().
>>
>>In its init() I load a data object via NEWOBJECT() and store a reference to that data object in a form method named oDataLib. I also do the following in the Init.
>>
>>THISFORM.cCurrentUserId = oAppLib.mGetUserId()
>>
>>SELECT rqst_ord
>>SET FILTER TO user_id = THISFORM.cCurrentUserId
>>LOCATE
>>
>>On the form is a VCR button for Go Top. In the click event I call:
>>
>>THISFORM.oDataLib.mGoTop()
>>
>>Inside of this method is the commmand: LOCATE
>>When this command is hit at runtime I receive an error "Object is not contained in a FORM".
>>
>>If I move the code out of the oDataLib.mGoTop() and put it directly inside of the command button the code runs fine.
What ben makes tracks for what wil be. Words in the air pirnt foot steps on the groun for us to put our feet in to.

Riddley Walker
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform