PDA

Click to See Complete Forum and Search --> : DBList question


May 20th, 2000, 02:36 PM
Hi All,

Does anyone know if it is possible to have multiple columns in DBLists? I don't see any obvious way about it.

I am trying to have several columns in it. I am also trying an alternative, having several dblists pulling separate columns. However, when I click on a record in the first dblist I would like it to refer to the relevant records in other dblists.

In other words, I have a row of about 5 datafields (columns). Since I haven't been able to add more than one column to a dblist, I am using multiple DBlists next to each other. When I click on one, I would like others to go the the right row. Is anyone able to offer a suggestion as to how to go about doing this?

Any help would be greatly appreciated.

May 20th, 2000, 03:26 PM
Just to add to that. In normal listboxes there is a .list property. What basically I'm after with that above is an equivalent of that property so that I can't point to a certain row in the dblist.

Thanks.

pardede
May 21st, 2000, 01:28 PM
As far as i know, there is no way to use multiple columns on dblist. An alternative is to move about in the list's recordset everytime you move in the list.

To sync your multiple DBlists you can set the .ListIndex and property of the lists to be equal for all lists (to select the same row), and the .TopIndex can be set equal for all lists to display the same row on the top of the list on every list

Perhaps this helps...

May 21st, 2000, 01:34 PM
I've tried using the listindex property but it doesn't look like dblist has that feature. Unless I'm doing something wrong. If possible, could you let me know how to sync two or more listindexes? I haven't played much with stuff like this so any help is greatly appreciated. Thanks.

pardede
May 23rd, 2000, 09:25 AM
You're right, DBList has no listindex property, I'm sorry. Maybe the following can shed a light, it comes from the helpfile:

SelectedItem Property

Returns a value containing a bookmark for the selected record in a DBCombo or DBList control.

Syntax

object.SelectedItem

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

When you select an item in the list portion of the control, the SelectedItem property contains a bookmark that you can use to reposition to the selected record in the Recordset of the Data control specified by the RowSource property.

Data Type

Variant

May 24th, 2000, 09:57 AM
Thanks. I've actually got it working with a single listbox in the end. In the data control I've selected the combined fields as well as the ID field, and refer to that ID when running queries. The dblist only shows the combined fields and everything works great.