| | |
Binding to TDBList
![]() |
Does anyone know of a tutorial/site that explains how to bind to a tdblist clearly? If anyone could explain it, I would also appreciate it.
So far I have this and must be missing something. It has been way too long since I have done anything in VB6.
Other than tdbList.ReBind I cannot think of what does it. I have everything bound from the properties side too. I think anyway.
BTW I am linking up to a SQL DB...
So far I have this and must be missing something. It has been way too long since I have done anything in VB6.

Other than tdbList.ReBind I cannot think of what does it. I have everything bound from the properties side too. I think anyway.
BTW I am linking up to a SQL DB...
Last edited by rrocket; Apr 3rd, 2008 at 6:10 pm.
Hi,
I guess, you want the code for "DataList" box control..:
add a "DataList" control on the form and set these Properties..:
RowSource = ADODC1
ListField ="MyFieldName"
BoundColumn = "MyFieldName"
if you dont have ADODC,
then @ runtime, you can open a recordset and set rowsource to that ADOrecordset
Regards
Veena
I guess, you want the code for "DataList" box control..:
add a "DataList" control on the form and set these Properties..:
RowSource = ADODC1
ListField ="MyFieldName"
BoundColumn = "MyFieldName"
if you dont have ADODC,
then @ runtime, you can open a recordset and set rowsource to that ADOrecordset
Regards
Veena
•
•
•
•
Hi,
I guess, you want the code for "DataList" box control..:
add a "DataList" control on the form and set these Properties..:
RowSource = ADODC1
ListField ="MyFieldName"
BoundColumn = "MyFieldName"
if you dont have ADODC,
then @ runtime, you can open a recordset and set rowsource to that ADOrecordset
Regards
Veena
vb Syntax (Toggle Plain Text)
Public Sub FormOpen(bModal As Boolean, bVisible As Boolean, CurrParentID As String, CurrLocationType As String, Optional fParentform As Form) 'Set datDirs.Recordset = RunSP("REC", "s_FRCBL", "42330", "Shipper") sOrder = "Company" strFilter = "Company" 'sFilter Screen.MousePointer = vbHourglass DataRefresh strFilter, sOrder Screen.MousePointer = vbDefault StartingPointer = 0 If Not StartingPointer = 0 Then 'Pointer to Current Selection has been requested With datDirs.Recordset If .RecordCount > 0 Then .MoveFirst .Find "ID=" & StartingPointer If Not .EOF Then TDBCust.Bookmark = .AbsolutePosition Else 'If not found in the list specified, look in the un-validated entries DataRefresh strFilter, sOrder If Not datDirs.Recordset.EOF Then datDirs.Recordset.MoveFirst .Find "ID=" & StartingPointer 'lstDirs.Bookmark = datDirs.RecordSet.AbsolutePosition End If End If End If End With End If Me.Show Abs(bModal) End Sub Private Sub DataRefresh(CurrFilter As String, CurrOrder As String) Dim x As Integer Dim strCurrFilter As String strCurrFilter = UCase(CurrFilter) Screen.MousePointer = vbHourglass 'Refresh List Message Opens 'cmdLoading.Visible = True DoEvents Me.AutoRedraw = False Set datDirs.Recordset = RunSP("REC", "s_DirectoryListByRole", strCurrFilter, CurrOrder) TDBCust.ReBind DirectoryListFormat sOrder 'lDirectoryId = TDBCust.Columns("ID") With datDirs.Recordset If Not lDirectoryId = 0 Then .Find "ID=" & lDirectoryId If .EOF Then If Not .BOF Then .MoveFirst End If SendKeys "{Home}+{Down}" Else TDBCust.Bookmark = .AbsolutePosition End If Else If Not .BOF Then .MoveFirst End If End If End With DoEvents Screen.MousePointer = vbDefault Me.AutoRedraw = True 'Me.Caption = strCurrFilter & " " & datDirs.Recordset.RecordCount End Sub
![]() |
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Timer problems!
- Next Thread: Comments
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





