Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Capture field data with cursor
Message
From
10/12/2009 04:50:38
 
 
To
09/12/2009 16:17:35
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01438152
Message ID:
01438349
Views:
51
>thanks so much stefan - your code works nicely. i've read through the VFP notes on cursor etc and I am having trouble adapting the syntax to my database. No matter what i do i can't seem to populate the table when it appears.
>
>Is there more to it than changing your intial temp set up code
>
>for example let's say these are my working elements
>mydatabase.dbf
>field names: sname, w1,w2,w2,w4,w5
>

The "core" parts of the previous sample were in the "Browse ..." and the "BindEvent(..." lines.

Since you said you are already having a Browse line in your current scenario, probably the first part might work by just adding a Name clause there.
So that that "Browse Name ..." would create an object (which was called "oBrowse" in the sample).

That object, and the other one, i.e. the "handler" object, both need to stay in scope, so that you can bindevent() them.
(In our previous sample, both were Public - perhaps in your scenario you might want to use any other "persistent place", i.e. something that keeps existing during the Browse, maybe custom properties of a form that you created, and which is running anyway.)

So assumed your current Browse is in a yourForm.yourButton.Click(), then our sample could be translated to something like a new click code, e.g.:
* Assuming Thisform has a custom property "oBrowse" and a custom method "myHandler"
Select theDesiredAlias
Browse Name Thisform.oBrowse
BindEvent(Thisform.oBrowse,'AfterRowColChange', Thisform,'myHandler')
hth
-Stefan
Previous
Reply
Map
View

Click here to load this message in the networking platform