VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Fill ComboBox with data from database.

by magscy (Philippines) (3 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Sun 9th June 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Fill ComboBox with data from database.

API Declarations


' paste the code.

Rate Fill ComboBox with data from database.



   'Open the Database
   Set DB = DBEngine.Workspaces(0).OpenDatabase(App.Path & "\your database.mdb")
   'Open table
   Set RS = DB.OpenRecordset("your table here")
   cboAnyName.Clear
   While Not RS.EOF
      cboAnyName.AddItem RS!AnyField
      If RS.EOF Then
         GoTo Exitna
      End If
      RS.MoveNext
   Wend
Exitna:
   RS.Close ' close table
   Set RS = Nothing
End Sub


Download this snippet    Add to My Saved Code

Fill ComboBox with data from database. Comments

No comments have been posted about Fill ComboBox with data from database.. Why not be the first to post a comment about Fill ComboBox with data from database..

Post your comment

Subject:
Message:
0/1000 characters