Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refreshing listboxes when using toolbar
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00016708
Message ID:
00016973
Views:
41
>>>>>Hi All,
>>>>>
>>>>>My form contains a listbox of names from my table and then the rest of the fields are displayed in textboxes for editing. When I use my toolbar to navigate the text boxes refresh just fine but my list box is dead...ie does not reflect the current record the record pointer is on. What code am I missing in my listbox or toolbar that is preventing my list box from reflecting my current location in the table?
>>>>>
>>>>>Many thanks
>>>>>
>>>>>Jon
>>>>Your DisplayValue or Value (sometimes better make sure that they both set up to proper meaning) for the Listbox should reflect changes in the RecordSource field when moving through table.
>>>
>>>Hi Nick,
>>>
>>>Currently, my RowSource is controlling the display and the RowSourceType is fields. What should I put in my DisplayValue or Value properties to make them reflect the currently selected record and go about refreshing it?
>>>
>>>Jon
>>
>>Hi Jon,
>>
>>If you are using thisform.refresh() in your toolbar buttons, or any other way to call your ListBox.Refresh(), and, say,your RowSourceType=6 and RowSource="myAlias.Name", just add to ListBox.Refresh method
>>
>>this.DisplayValue=myAlias.Name.
>>
>>I also send you the sample form with this by E-Mail.
>>
>>Nick
>
>Jon & Nick: Check your ControlSource property as well. If this is set to a field in your main table (the one you are moving through) then the listbox should refresh correctly.
>Barbara

Thanks A LOT! It worked.

Thanks Nick for the file, I'm really doing too much version 2.5 programming, your example shows how easy it can be if you try to forget the old way of doing things.

Jon
Jon Paskett

Microsoft Certified Systems Engineer
We all have to start somewhere...
Sometimes over again!
Previous
Reply
Map
View

Click here to load this message in the networking platform