How to get to access tables from inside access vb editor 
Author Message
 How to get to access tables from inside access vb editor

i need to access the tables of my database from a module in the same
i'm not sure what the syntax is , probably something like
access.currentdb or something
i have tried playing around with it but to no avail

i also tried opening an ado recordset but for some reason could not update
it.said that object or provider cant do it
this is what i tried just in case:
any help would be appreciated,

 Dim Fsys As FileSystemObject

        Dim thisfolder As Object

        Dim records As ADODB.Recordset

        Set records = New ADODB.Recordset

        Dim command As ADODB.command

        Set command = New ADODB.command

        Dim conn As ADODB.Connection

        Set conn = New ADODB.Connection

        Dim stDBPath As String

        strdbpath = "C:\My Documents\contacts.mdb"

        With conn

            .Provider = "Microsoft.Jet.OLEDB.4.0"

            .Open strdbpath

        End With

        records.CursorType = adOpenStatic

        records.LockType = adLockOptimistic

        records.CursorLocation = adUseClient

        command.ActiveConnection = conn

        command.CommandText = "select * from docname"

        Set records = command.Execute

        records.Fields("docname") = "hello"


        Set conn = Nothing

Sat, 22 Mar 2003 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Getting data from Access tables with VB6 without Access

2. Getting list of Access DB tables with VB

3. Getting list of tables in Access file with VB

4. help getting access VB 3.0 system tables

5. Getting Access data table names in VB 5 (SP3)

6. Getting Access data table names in VB 5 (SP3)

7. Opening an Access File inside an Access Application

8. Linking Access Tables in Different *.mdb Files, Populating an Access Table From Several Others

9. Importing an Access 2000 table into another Access 2000 database with VB Code

10. Accessing .DBF-files (or MS-Access tables) from VB

11. open Access table = locked Access table??

12. Using VB to run an Access 7.0 Make table into Access 2


Powered by phpBB® Forum Software