how do i show DB Access datasheet in vb program
hi, experts, how do i shoe the db Access datasheet in the vb program.....
my previous code is this:
Dim db As Database
Dim ws As Workspace
Dim Rst As DAO.Recordset
Set ws = DBEngine.Workspaces(0)
Set db = ws.OpenDatabase(MyConn)
Set Rst = db.OpenRecordset("SELECT * FROM " & month.Text & " ORDER BY (invoiceno)", dbOpenDynaset, dbReadOnly)
Do While Not Rst.EOF
cmbDr.AddItem Rst.Fields("invoiceno")
Rst.MoveNext
Loop
----------------------------------------------
but i doesnt work.....
do anyone have a better idea of showing the DB Access datasheet......
Ah Xing