| | |
drop down list in VB6 from Access table
![]() |
•
•
Join Date: Oct 2004
Posts: 2
Reputation:
Solved Threads: 0
Hello
This is my first posting...and the next will be my second ...lol
I need to show the entire contents of a field in an access table, so that you can choose one item. i can then input data for the other equations. this is for a project and the vb form is an invoice. I can create the links but scrolling the data box is the only way i can get the value in the drop down box to change
Help please
This is my first posting...and the next will be my second ...lol
I need to show the entire contents of a field in an access table, so that you can choose one item. i can then input data for the other equations. this is for a project and the vb form is an invoice. I can create the links but scrolling the data box is the only way i can get the value in the drop down box to change
Help please
•
•
Join Date: Oct 2004
Posts: 15
Reputation:
Solved Threads: 0
If you are using bound controls, if I was you don't!! they work for millions of people but you do not have full control, and you learn nothing.
To add to a dropdown list.
obviously do not open a database connection everytime. 
PS don't forget to add the microsoft DAO object library first in the project references.
To add to a dropdown list.
•
•
•
•
Dim db As Database
Set db = opendatabase("c:\mydatabase\mydb.mdb")
Set mRs = db.openRecordset("select myField from myTable order by myField")
Do While Not mRs.EOF
Combo1.AddItem mRs("myField").Value
mRs.movenext
Loop

PS don't forget to add the microsoft DAO object library first in the project references.
![]() |
Similar Threads
- Text field updation on selction of drop down list (JSP)
- Populating Multiple Text Fields Based On A Dynamic Drop-Down List Selection (PHP)
- drop down list question. (ASP.NET)
- VB6 and MS Access 2002 (Visual Basic 4 / 5 / 6)
- Blank drop list (PHP)
- printing an access table in VB6 (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: printing an access table in VB6
- Next Thread: Running a program before loading Windows Explorer during booting
| 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





