Convert a database from accdb to accde

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sameh awad
    New Member
    • Feb 2016
    • 6

    Convert a database from accdb to accde

    hi everybody
    Please I want a code to convert database from accdb to accde
    thanks a lot
  • Narender Sagar
    New Member
    • Jul 2011
    • 189

    #2
    You don't need any code to convert it. Just use Save As command and proceed.

    Comment

    • sameh awad
      New Member
      • Feb 2016
      • 6

      #3
      I want it in one step
      instead of many steps i follow to reach the accde
      thanks a lot

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        I don't understand, are you saying you want to write custom code to do the conversion rather than following a few steps manually?

        Comment

        • sameh awad
          New Member
          • Feb 2016
          • 6

          #5
          yes
          1St step:-database tool--->MAKE ACCDE
          2ND STEP:-adjust the new destination(acc de folder)---->save
          I hope the code involved d:\accde_Folder
          thanks a lot for your attention

          Comment

          • NeoPa
            Recognized Expert Moderator MVP
            • Oct 2006
            • 32662

            #6
            There is an undocumented Action of the SysCmd Application method which is 603 and it will do a Make*DE task for you.

            Here's a procedure I use to create a *DE file :
            Code:
            'MakeMDE() creates an *DE file from an *DB file.
            Public Function MakeMDE(strDB As String _
                                  , Optional ByVal strDBTo As String = "" _
                                  , Optional ByVal strPW As String = "") As Boolean
                Dim appAcc As Access.Application
            
                On Error GoTo ErrorHandler
                If strDBTo = "" Then strDBTo = Left(strDB, Len(strDB) - 1) & "e"
                If Exist(strFile:=strDBTo) Then
                    SetAttr strDBTo, vbNormal
                    Kill strDBTo
                End If
                Set appAcc = New Access.Application
                With appAcc
                    Call AppWindowState(.Application, AppWindowState(Application))
                    If strPW > "" Then SendKeys strPW & "~"
                    Call .SysCmd(603, strDB, strDBTo)
                    Call .Quit
                End With
                Set appAcc = Nothing
                MakeMDE = Exist(strDBTo)
            
            ErrorHandler:
                If Not appAcc Is Nothing Then Call appAcc.Quit
            End Function
            It uses another procedure Exist() :
            Code:
            'Exist() returns true if strFile exists.  By default ignores folders.
            '22/05/2003 Rewritten with better code.
            '20/05/2005 Added finding of R/O, System & Hidden files.
            '11/12/2012 Added handling of inaccessible drives.
            '22/05/2013 Added code to avoid false positives for folders.
            Public Function Exist(ByVal strFile As String _
                                , Optional intAttrib As Integer = vbReadOnly _
                                                               Or vbHidden _
                                                               Or vbSystem) As Boolean
                On Error Resume Next
                'Strip trailing "\" characters as this gives a false reading.
                If Right(strFile, 1) = "\" Then strFile = Left(strFile, Len(strFile) - 1)
                Exist = (Dir(PathName:=strFile, Attributes:=intAttrib) <> "")
            End Function

            Comment

            • sameh awad
              New Member
              • Feb 2016
              • 6

              #7
              thanks very much
              please i want a database with a button included this function beacuse i tryied and give me an error
              please i want the target in the code "d:\deps\ac cde"
              thanks for your attention

              Comment

              • NeoPa
                Recognized Expert Moderator MVP
                • Oct 2006
                • 32662

                #8
                Please understand that we aren't a free resource to do your work for you. I suggest you look at what you have to do to turn this into what you need. There's very little left to do to be fair.

                Comment

                • sameh awad
                  New Member
                  • Feb 2016
                  • 6

                  #9
                  i am apologize for you
                  i can't apply this Procedure so i asked for a help
                  i am Practise Access since 2007 So i consider myself as a beginner
                  thanks NeoPa
                  thanks Rabbit
                  thanks Narender Sagar

                  Comment

                  • NeoPa
                    Recognized Expert Moderator MVP
                    • Oct 2006
                    • 32662

                    #10
                    We cannot help further at this stage. You have not shown any interest in doing your own work, nor even in asking for help with your own attempts. Simply saying you've failed to get it to work is wholly inadequate.

                    If you try but fail then you can ask for help. You haven't yet, and until you do no-one will be allowed to prompt you further.

                    If your experience or skill is so under-developed that you can't start, even with most of the work done for you, then you probably need to do some work learning the basics before coming here asking for help. Some helpful places to start are :
                    1. Microsoft Access Tutorials (Strive4Peace).
                    2. Microsoft Access Tutorials
                    3. Microsoft Office Tutorials.
                    4. VBA Tutorial (Excel).


                    They may not all suit you but I expect you'll find some of them very helpful.

                    Comment

                    • sameh awad
                      New Member
                      • Feb 2016
                      • 6

                      #11
                      Thanks NeoPa
                      thanks for the code ,the links which i will studying them and from your nice advise:-
                      its time to begin learning vba that what also what i need
                      i must try and try before i ask for a help
                      i'll start with:-
                      Beginning Access 2003 VBA
                      VBA Programming For The Absolute Beginner Second Edition
                      From my heart:Thanks my brother "NeoPa"

                      Comment

                      • NeoPa
                        Recognized Expert Moderator MVP
                        • Oct 2006
                        • 32662

                        #12
                        I sincerely hope you manage to make progress from those tutorials. There's some good stuff in them.

                        We'll be here when you're ready to go further. We can work with you to help you progress.

                        Comment

                        Working...