How to show Data List with data environment 
Author Message
 How to show Data List with data environment

Hello

I have made a table in data environment. Then I set the rowsource, rowmember
and listfield refer to the table in data environment.

But it only display one item. Could the DataList display 2 or more item?
If an user clicks a row, how could I get which row the user clicks and
return the value?

I find that there is property of datafield, datamember, datasource and
boundcolumn. What is the function of them?

Pls Help

pc



Fri, 19 Oct 2001 03:00:00 GMT  
 How to show Data List with data environment
"I would check the documentation for linking two tables using DataCombo",
but What are you trying to do?
If your passing a parameter with a Datalist do this...
Variable = DataList.SelectedItem
You only need to fill in the row source and list field for this. It returns
all the records in that field.

If your searching through a recordset do this...
    datPrimaryRS.Recordset.MoveFirst
    datPrimaryRS.Recordset.Find "CustomerID = '" &  DCboCustomer.BoundText &
"'", , adSearchForward
Thats what the Bound field is for...

If you really want to use a Datalist get fancy do this w/ a Treeview...

Set rsAllNames = datPrimaryRS.Recordset

If (rsAllNames.RecordCount > 0) Then
  rsAllNames.MoveFirst
End If

For indx = Asc("A") To Asc("Z")
 currentAlpha = Chr(indx)

 Set contactNode = tvContact.Nodes.Add _
    (, , currentAlpha, currentAlpha)

 If (Not rsAllNames.EOF) Then
  Do While UCase$(Left(rsAllNames!CompanyName, 1)) = currentAlpha

     DoEvents

    Set contactNode = tvContact.Nodes.Add(currentAlpha, tvwChild, "ID" &
CStr(rsAllNames!CustomerID), rsAllNames!CompanyName)
    rsAllNames.MoveNext
    If (rsAllNames.EOF) Then
      Exit Do
    End If
  Loop
 End If
Next

Quote:

>Hello

>I have made a table in data environment. Then I set the rowsource,
rowmember
>and listfield refer to the table in data environment.

>But it only display one item. Could the DataList display 2 or more item?
>If an user clicks a row, how could I get which row the user clicks and
>return the value?

>I find that there is property of datafield, datamember, datasource and
>boundcolumn. What is the function of them?

>Pls Help

>pc



Mon, 22 Oct 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Showing parameters pass to data environment in data report header

2. Showing parameters pass to data environment in data report header

3. Showing parameters pass to data environment in data report header

4. VB6 ADO application can't show data in runtime environment

5. Data Environment List

6. Data Environment and List Boxes VB6

7. List Data Environments and commands for user control

8. Help with Data Environment/Dropdown List

9. Data Environment / Data Report Problem

10. Data environment problems - refreshing data

11. Help! Data Report without Data Environment

12. data report / data environment designers

 

 
Powered by phpBB® Forum Software