14 Replies - 1147 Views - Last Post: 29 September 2011 - 09:38 AM
#1
What is the difference between datacombo and combo in vb6 ?
Posted 16 September 2011 - 06:19 AM
Replies To: What is the difference between datacombo and combo in vb6 ?
#3
Re: What is the difference between datacombo and combo in vb6 ?
Posted 17 September 2011 - 10:00 PM
#4
Re: What is the difference between datacombo and combo in vb6 ?
Posted 17 September 2011 - 10:50 PM
#5
Re: What is the difference between datacombo and combo in vb6 ?
Posted 19 September 2011 - 02:25 AM
BobRodes, on 18 September 2011 - 08:50 AM, said:
well, my database is Mydb.mdb, and data-source is mainTbl which is contains 2 columns ID and Tel-No, I want the combo box (Not DataCombo) to be filled by Tel-No can you write the code for this combo?
forgive me may I look lazy but I don't know how to find the correct codes from the references.
This post has been edited by haidar976: 19 September 2011 - 02:30 AM
#6
Re: What is the difference between datacombo and combo in vb6 ?
Posted 19 September 2011 - 03:33 AM
do while not rs.EOF . combobox1.additem rs.fields(0) . rs.movenext Loop
The code may have misspellings, but you got the idea
This post has been edited by Ionut: 19 September 2011 - 03:34 AM
#7
Re: What is the difference between datacombo and combo in vb6 ?
Posted 19 September 2011 - 12:57 PM
#8
Re: What is the difference between datacombo and combo in vb6 ?
Posted 20 September 2011 - 12:07 AM
Ionut, on 19 September 2011 - 01:33 PM, said:
do while not rs.EOF . combobox1.additem rs.fields(0) . rs.movenext Loop
The code may have misspellings, but you got the idea
I have Adodc2 which connect to the mydb.mdb and the table name is (office)
i wrote this code
Dim rs As Recordset rs = Adodc2.Recordset combo2.AddItem rs.Fields(0) rs.MoveNext Loop
and I wrote this in the Private Sub Form_Load()
but I got this error
Compile error
Invalid use of property
where is my mistake?
#9
Re: What is the difference between datacombo and combo in vb6 ?
Posted 20 September 2011 - 04:27 PM
This post has been edited by BobRodes: 20 September 2011 - 04:27 PM
#10
Re: What is the difference between datacombo and combo in vb6 ?
Posted 20 September 2011 - 10:29 PM
BobRodes, on 21 September 2011 - 02:27 AM, said:
First i have to mention that I forgot to write the line of do while in the replay above, so the real code I did in my project is:
Dim rs As Recordset rs = Adodc2.Recordset Do While not rs.EOF combo2.AddItem rs.Fields(0) rs.MoveNext Loop
the error line (in yellow color) is the first line in the class, which is:
Private Sub Form_Load()
#11
Re: What is the difference between datacombo and combo in vb6 ?
Posted 21 September 2011 - 03:48 PM
#12
Re: What is the difference between datacombo and combo in vb6 ?
Posted 21 September 2011 - 07:16 PM
set rs=adodc2.recordset
This post has been edited by thava: 21 September 2011 - 07:17 PM
#13
Re: What is the difference between datacombo and combo in vb6 ?
Posted 21 September 2011 - 10:34 PM
set rs = adodc2.recordset
BobRodes, on 18 September 2011 - 08:50 AM, said:
I also tried this way, but I got the same error
#14
Re: What is the difference between datacombo and combo in vb6 ?
Posted 22 September 2011 - 12:34 PM
BobRodes, on 22 September 2011 - 01:48 AM, said:
I also tried this way, but the same error appear!
Any way i was tried to learn more ways and that was really helpful
thank you
#15
Re: What is the difference between datacombo and combo in vb6 ?
Posted 29 September 2011 - 09:38 AM
|
|

New Topic/Question
Reply




MultiQuote




|