| | |
getting records on the basis of combo box
Thread Solved |
•
•
Join Date: Dec 2008
Posts: 292
Reputation:
Solved Threads: 1
Can anybody tell me.How should i get value on the basis of combo box.i simple want when user click one of the productname from the combo box other corresponding fields from the database should come in the text box of the form.Here is the code what i have written.kindly help me.any help would be greately appreciated.right
now i am getting runtime error 3709.
now i am getting runtime error 3709.
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Private Sub Combo3_Click() If Combo3.Text <> "" Then Set rs = New ADODB.Recordset rs.Open "select materials.unit from Materials Where Materials.productname=" & Combo3.Text & ", con,adopendynamic,adlockoptimistic" TxtUnit.Text = rs!Unit End If End Sub
Hi,
If Product Name is String, then Wrap it with Single Quotes :
Try This :
Regards
Veena
If Product Name is String, then Wrap it with Single Quotes :
Try This :
vb Syntax (Toggle Plain Text)
Set rs = Nothing Set rs = New ADODB.Recordset rs.Open "select materials.unit from Materials Where Materials.productname='" & Combo3.Text & "'", Con ' Rest of Coding Remains Same '
Regards
Veena
![]() |
Similar Threads
- Issue about passing parameter to Crystal Report 11.. (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Mcrypt_cbc with TripleDES for vb6
- Next Thread: I am finding command addfont into registry of windows
| 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





