Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid & Memo and other problems...
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00227549
Message ID:
00228441
Views:
22
> Now it works for the test form, but still doesn't work for actual form - grid appears blank.

Well, some progress :) Put quotes around the lcValue, like this:

lcValue = "IIF(lbValue,'N','Y')"

>
> This is my new code:
>
> if TYPE(lafieldlist[i])="L"
> lbValue=&lafieldlist[i]
> lcValue=IIF(lbValue,'N','Y')
> This.columns(i).controlsource="''+lcValue"
> else
> This.columns(i).controlsource = lafieldlist[i] && Assign controlsource
> endif
>
>
> I have another unrelated problem. How can I define which control of my form has focus before I do something and how can I return focus on this object?

To define focus, first set the tab order, so that the first tabindex control will get the first focus. After that, you can maneuver the focus in code by doing in, for example, controlA Lostfocus:

nodefault
thisform.controlB.setfocus


>
>For example, I have form with 3 grids and navigation bar. I seat on second grid, then I click next button of my navigation bar. I want to return focus on second grid now. How can I do that?

thisform.grd2.setfocus && or whatever you name the grid
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform