|
-
Aug 2nd, 2004, 09:42 AM
#3
Addicted Member
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)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'add a datagrid to your projet
Set DataGrid1.DataSource = Rst
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''Do While Not Rst.EOF
'''''''''''''cmbDr.AddItem Rst.Fields("invoiceno")
''''''''''''''''Rst.MoveNext
''''''''''''''''Loop
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|