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

    exportaltables (Access 2000)

    I have a function for exporting all tables.Can i modify it so as NOT to export the tables ending with 1 ? the function is :
    Public Function ExportAllTables(DBName As String, strPassword As String) As Boolean
    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 Then
    DoCmd.TransferDatabase acExport, "Microsoft Access", BackDB.Name, acTable, Tbl.Name, Tbl.Name
    End If
    Next
    BackDB.Close
    FrontDB.Close
    End Function

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

    Re: exportaltables (Access 2000)

    Change the line

    If Tbl.Attributes = 0 Then

    to

    If Tbl.Attributes = 0 And Not Right(Tbl.Name, 1) = "1" Then

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

    Re: exportaltables (Access 2000)

    Super ! i thought it is not possible

Posting Permissions

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