Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Mar 2006
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    export tables (Access 2000)

    I want to export only tables with ending 1, for example products1, orders1, etc and not products an orders.However my function does not u do it, could you help ?
    Public Function ExportAllTablesPP(DBName As String, strPassword As String) As Boolean
    ' call it so : ExportAllTablesPP "C:bebe.mdb", "pin"
    Dim FrontDB As Database, BackDB As Database, Tbl As DAO.TableDef
    Set FrontDB = CurrentDb
    Set BackDB = OpenDatabase(DBName, True, False, ";PWD=" & strPassword)
    For Each Tbl In FrontDB.TableDefs
    If Tbl.Attributes = 0 And Not Right(Tbl.Name, 1) = "1" Then
    DoCmd.TransferDatabase acExport, "Microsoft Access", BackDB.Name, acTable, Tbl.Name, Tbl.Name
    End If
    Next
    BackDB.Close
    FrontDB.Close
    End Function

  2. #2
    2 Star Lounger
    Join Date
    Mar 2006
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: export tables (Access 2000)

    just to add, actually my function export only tables without ending 1 and i want the opposite, to export only tables with endings 1

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: export tables (Access 2000)

    Obviously, you have to remove the word Not.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •