Table Backup

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • peshawa IT
    New Member
    • Jan 2014
    • 8

    #16
    yeas it was work but I don't want in this DB , export to another db

    Comment

    • zmbd
      Recognized Expert Moderator Expert
      • Mar 2012
      • 5501

      #17
      peshawa IT:
      You've said that and you are not reading the full link....

      please read thru all of the properties....

      You can set DatabaseName:=( full path...)

      ----------
      DoCmd.TransferD atabase Method (Access)Office 2010
      DatabaseName
      Optional
      Variant
      A string expression that's the full name, including the path, of the database you want to use to import, export, or link data.
      ----------

      BTW:
      Please understand, many of us cannot or will not d/l un-requested attachments. This has absolutely nothing to do with who you are... In my case, such d/l are prohibited by my ITSec staff. For many others, it is part of "safe computing/best practices" not to d/l such files. A practical example as to why can be found here http://bytes.com/topic/access/answer...l-ms-products. this unfourtunate Member opened a file from a trusted source and is now haveing all sorts of issues!

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32669

        #18
        Peshawa IT
        "yeas it was work but I don't want in this DB , export to another db"

        That is exactly why I included in my reply what you need to know to export it to another db. Why have you posted this again after it has already been answered and explained in detail? I can only assume you haven't even read what was posted.

        I strongly recommend that you read everything carefully before ever replying. It can save you a lot of embarrassment.

        Comment

        • peshawa IT
          New Member
          • Jan 2014
          • 8

          #19
          I'm so sorry for happened this mistake, but look the code
          Code:
          DoCmd.TransferDatabase acImport, "Microsoft Access", _
              "C:\Users\Peshawa-PC\Desktop\search.mdb", acTable, "stor", "Backuo Of Stor"
          and this
          Code:
          DoCmd.TransferDatabase acLink, "Microsoft Access", "C:\Users\Peshawa-PC\Desktop\search.mdb", acTable, "stor", "FF"
          most of them worked thanks for all, sorry I'm new and my engish not good please forgave me.

          Comment

          • NeoPa
            Recognized Expert Moderator MVP
            • Oct 2006
            • 32669

            #20
            It can be very difficult and confusing trying to get help in a foreign language. I hope that you have found what we've posted to be helpful nevertheless.

            It seems that you now have what you need to do this (It's hard to be very clear on what you're saying, but that is not any reason for criticism in the circumstances so please don't take this comment to be criticism). If not, please let us know.

            Comment

            • zmbd
              Recognized Expert Moderator Expert
              • Mar 2012
              • 5501

              #21
              You don't appear to mention if this is working for you, and in each case of the code you have provided, you are not exporting the desired table from the current database but either importing from or linking to another database.


              To Export your command should be:
              Code:
              DoCmd.TransferDatabase 
                  TransferType:=acExport, _
                  DatabaseType:="Microsoft Access", _
                  DatabaseName:="C:\Users\Peshawa-PC\Desktop\search.mdb", _
                  ObjectType:=acTable, _
                  Source:="stor", _
                  Destination:="Backup_Of_Stor", _
                  StructureOnly:=False
              Note three differences:
              1) The use of named arguments - Nameing is optional.
              2) Line 2: TransferType:=a cExport
              3) Line 7: Destination:="B ackup_Of_Stor" - no spaces. I know it's allowed in todays world, but back in the day...
              4)You also should make sure that search.mdb is available prior to running this command as it will not create the target database.

              Also the mdb file format is getting quite old, you should consider moving the files to the newer ACCDB unless you are using the older "user level" security model.

              Comment

              Working...