Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
List - selected item
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00011428
Message ID:
00011434
Views:
29
>How do I programmatically change the selected item on a list control, when I do not know the IndexID?
>
>I have a form which contains a list of contacts on the left side, and the detail for the selected contact on the right side (a container object of textfields). I add a new contact by:
> scatter memvars blank
> Insert Into SQL statement
>
>When the user has completed the record, they click a "Confirm" button that does the TableUpdate.
>
>At that point, I want the new contact to be selected in the list. It does appear in the list, as it is bound to the same cursor as the container object fields, but I can't get it to move to the correct field. I do not know the list item # of the new record at that time.
>
>TIA.

One way to do it is

For I = 1 to listcount
if listitem match searchvar, then select it
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