| | |
Listbox
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jun 2006
Posts: 29
Reputation:
Solved Threads: 0
greetings
i'm currently working on my Form in VB6. it has a list box that i use to display table. How do i display table from a different database?
i did it before by modifying row source property in VBA, but that only works if the form is part of that database application.
but now i want to use a ListBox in a VB6 application instead, which i tried but the listbox remained empty.
this function i use in my VB6 program to open the VBA database application
with this i can read the values that reside in the tables. but how do i display the tables in the form of listbox instead? what should i put in RowSource property of the listbox?
thanks in advance
i'm currently working on my Form in VB6. it has a list box that i use to display table. How do i display table from a different database?
i did it before by modifying row source property in VBA, but that only works if the form is part of that database application.
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
WaferSortRowSource = "SELECT [ABP/FET Wafer Sort].[D/C], [ABP/FET Wafer Sort].[P/N]," & _ "[ABP/FET Wafer Sort].Process," & _ " [ABP/FET Wafer Sort].[" & ColumnNo(1) & _ "], [ABP/FET Wafer Sort].[" & ColumnNo(2) & _ "], [ABP/FET Wafer Sort].[" & ColumnNo(3) & _ "], [ABP/FET Wafer Sort].[" & ColumnNo(4) & _ "], [ABP/FET Wafer Sort].[" & ColumnNo(5) & _ "] FROM [ABP/FET Wafer Sort] ; " WaferSort.RowSource = WaferSortRowSource
but now i want to use a ListBox in a VB6 application instead, which i tried but the listbox remained empty.
this function i use in my VB6 program to open the VBA database application
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Function OpenConnection() conConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _ "//agmlhkhoo/NewFolder/cobaan.mdb;Mode=Read|Write" conConnection.CursorLocation = adUseClient conConnection.Open End Function
with this i can read the values that reside in the tables. but how do i display the tables in the form of listbox instead? what should i put in RowSource property of the listbox?
thanks in advance
Last edited by BombAppetit; Jul 27th, 2006 at 12:10 am.
I think a listbox is a bit more difficult to work with.... If I'm not mistaken, you'll have to do it all manually, such as using the "additem" property of the listbox..... you can use the sendmessage API call to force the listbox to use columns and keep the data orderly, but I think a listview would suite your needs better.
![]() |
Similar Threads
- Integer to string then 2 listbox (Visual Basic 4 / 5 / 6)
- link text boxes with listbox (VB.NET)
- Listbox with Columns (Visual Basic 4 / 5 / 6)
- Adding Totals from Listbox DB (DAO) (Visual Basic 4 / 5 / 6)
- Populating & Retrieving Data in a listbox : ASP.NET (w/ VB.NET) (ASP.NET)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Div/0 Error
- Next Thread: Can some one help me with this code plz
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column 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 retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






