Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 159585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:53:07+00:00 2026-05-11T10:53:07+00:00

I am trying to extract the schema of an .mdb database, so that I

  • 0

I am trying to extract the schema of an .mdb database, so that I can recreate the database elsewhere.

How can I pull off something like this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T10:53:08+00:00Added an answer on May 11, 2026 at 10:53 am

    It is possible to do a little with VBA. For example, here is a start on creating script for a database with local tables.

    Dim db As Database Dim tdf As TableDef Dim fld As DAO.Field Dim ndx As DAO.Index Dim strSQL As String Dim strFlds As String Dim strCn As String  Dim fs, f      Set db = CurrentDb      Set fs = CreateObject("Scripting.FileSystemObject")     Set f = fs.CreateTextFile("C:\Docs\Schema.txt")          For Each tdf In db.TableDefs         If Left(tdf.Name, 4) <> "Msys" Then             strSQL = "strSQL=""CREATE TABLE [" & tdf.Name & "] ("                          strFlds = ""                          For Each fld In tdf.Fields                                  strFlds = strFlds & ",[" & fld.Name & "] "                                  Select Case fld.Type                                      Case dbText                         'No look-up fields                         strFlds = strFlds & "Text (" & fld.Size & ")"                                          Case dbLong                         If (fld.Attributes And dbAutoIncrField) = 0& Then                             strFlds = strFlds & "Long"                         Else                             strFlds = strFlds & "Counter"                         End If                          Case dbBoolean                         strFlds = strFlds & "YesNo"                          Case dbByte                         strFlds = strFlds & "Byte"                                              Case dbInteger                         strFlds = strFlds & "Integer"                                          Case dbCurrency                         strFlds = strFlds & "Currency"                                  Case dbSingle                         strFlds = strFlds & "Single"                                  Case dbDouble                         strFlds = strFlds & "Double"                                  Case dbDate                         strFlds = strFlds & "DateTime"                                  Case dbBinary                         strFlds = strFlds & "Binary"                                  Case dbLongBinary                         strFlds = strFlds & "OLE Object"                                              Case dbMemo                         If (fld.Attributes And dbHyperlinkField) = 0& Then                             strFlds = strFlds & "Memo"                         Else                             strFlds = strFlds & "Hyperlink"                         End If                                              Case dbGUID                         strFlds = strFlds & "GUID"                                          End Select                          Next                  strSQL = strSQL & Mid(strFlds, 2) & " )""" & vbCrLf & "Currentdb.Execute strSQL"                          f.WriteLine vbCrLf & strSQL                      'Indexes             For Each ndx In tdf.Indexes                              If ndx.Unique Then                     strSQL = "strSQL=""CREATE UNIQUE INDEX "                 Else                     strSQL = "strSQL=""CREATE INDEX "                 End If                                  strSQL = strSQL & "[" & ndx.Name & "] ON [" & tdf.Name & "] ("                                  strFlds = ""                  For Each fld In tdf.Fields                     strFlds = strFlds & ",[" & fld.Name & "]"                 Next                                      strSQL = strSQL & Mid(strFlds, 2) & ") "                                  strCn = ""                                  If ndx.Primary Then                     strCn = " PRIMARY"                 End If                                  If ndx.Required Then                     strCn = strCn & " DISALLOW NULL"                 End If                                  If ndx.IgnoreNulls Then                     strCn = strCn & " IGNORE NULL"                 End If                                  If Trim(strCn) <> vbNullString Then                     strSQL = strSQL & " WITH" & strCn & " "                 End If                                  f.WriteLine vbCrLf & strSQL & """" & vbCrLf & "Currentdb.Execute strSQL"             Next         End If     Next              f.Close 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 69k
  • Answers 69k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer When it comes to the execution plan in SQL Server… May 11, 2026 at 12:28 pm
  • added an answer It's a non-trivial question. There is no official API for… May 11, 2026 at 12:28 pm
  • added an answer Huh? The decimal/hex doesn't matter if you have the value… May 11, 2026 at 12:28 pm

Related Questions

I am trying to extract a gif image embedded as a resource within my
I am trying to extract a certain part of a column that is between
I am trying to extract a table of values from an excel (2003) spreadsheet
I was trying to add the XML schema to an existing EJB project. JAXB
I am trying to send my dynamically created silverlight 2 page/image to a an
I'm not a JS guy so I'm kinda stumbling around in the dark. Basically,

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.