| | |
combolist data selecte with textbox relation
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Oct 2009
Posts: 2
Reputation:
Solved Threads: 0
I have one combo box “cboitemname” and one text box “itemcode” in vb6 form,I have a table “stock” in sql server 2000 database where data about item name and its code is present, in rutime I want to disply item code of item that I select from combolist, how should I do this?
Last edited by Salman Attari; Oct 31st, 2009 at 2:27 am.
•
•
Join Date: Jan 2008
Posts: 255
Reputation:
Solved Threads: 38
0
#3 Oct 31st, 2009
As follows -
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Set rsItemName = New ADODB.Recordset rsItemName.Open "......", cnItemNAme, adOpenStatic, adLockOptimistic 'Where open is your connection string If rsItemName.BOF = True Then Exit Sub ElseIf rsItemName.EOF = True Then Exit Sub Else Do While rsItemName.EOF = False cmbItemName.AddItem rsItemName("ItemCode") 'ItemCode is the name of your field rsItemName.MoveNext Loop End If
Please mark questions as answered when done.
Be the ONE!!!
Be the ONE!!!
![]() |
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: related Combolist data in textbox from database
- Next Thread: Checking if not a number help
| 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





