954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

drop down list in VB6 from Access table

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 :sad:

spartanNE
Newbie Poster
2 posts since Oct 2004
Reputation Points: 10
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.

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

obviously do not open a database connection everytime. :)

PS don't forget to add the microsoft DAO object library first in the project references.

clartsonly
Newbie Poster
15 posts since Oct 2004
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You