View mdb tables rows by rows 
Author Message
 View mdb tables rows by rows

Hi all
I try to bring mdb tables like this:
1)bring all the tables
2)click on tables and bring all the data rows by rows (txt format)
to textbox but not with automation


Sun, 02 Jun 2002 03:00:00 GMT  
 View mdb tables rows by rows

> but not with automation

I don't quite understand what you mean by that.  Here are some DAO examples
you could use;

Option Explicit
Private m_db As DAO.Database

Private Sub Command1_Click()
Dim daoTable As DAO.TableDef

    For Each daoTable In m_db.TableDefs
        List1.AddItem daoTable.Name
    Next daoTable
End Sub

Private Sub Form_Load()
Dim DBE As New DAO.DBEngine

    Set m_db = DBE.OpenDatabase("c:\directory\path\db1.mdb")

End Sub

Private Sub List1_Click()
Dim daoTable As DAO.TableDef
Dim daoRS As DAO.Recordset
Dim daoField As DAO.Field

    Text1 = ""
    Set daoRS = m_db.TableDefs(List1.Text).OpenRecordset
    While Not daoRS.EOF
        For Each daoField In daoRS.Fields
            Text1 = Text1 & daoField.Name & " = " & daoField.Value & " "
        Next daoField
        Text1 = Text1 & vbCrLf
End Sub

Add a multi-line text box a command button and a listbox to the form

Sun, 02 Jun 2002 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. adding a table row, without setting same defaults as previous row

2. row heights of table rows added by vba

3. Err No rows at, duplicate table and row names

4. table row text will not show after row insert

5. How to read Access Table row by row?

6. Highlighting a Entire row in list view with Report view as its style

7. Moveing rows from table to table

8. group every 8 rows in 1 row

9. Calculating a field from same row for each row/record in form

10. Getting row number variable from a selected row in Excel

11. Copy row and past rows not centered

12. Determining actual row height, or setting maximum row height


Powered by phpBB® Forum Software