Results 1 to 7 of 7

Thread: how to read the MDB-Table description from WORD?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    26

    how to read the MDB-Table description from WORD?

    hi all

    I mean a description, that you can see by MDB-Open - in main window of MDB (sorry for this explanation)
    There are for example: first column = TableName, second = Description, third = Modified etc... in this main-window of MDB.

    I can read table-name - CurrentDb.TableDefs("Table1").Name and etc...
    but I can't find there "Description"

    could you pls help me!

    kind regards,
    Baloo.
    Last edited by Baloo; Feb 17th, 2006 at 06:52 AM.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: how to read table-description from MDB?

    You want
    Code:
    .Fields("Name").Properties("Description")

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    26

    Re: how to read table-description from MDB?

    thanks, Hack!

    But I don't need to read description of TableFields, I need description of the whole table.
    I've also tried:
    VB Code:
    1. CurrentDb.TableDefs("Table1").Properties("Description")
    But there aren't such item in this collection "Properties(...)" for TableDef

    Could you be so kind to find this description exactly for whole table?

    kind regards,
    Baloo.

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: how to read table-description from MDB?

    This has always worked for me...
    VB Code:
    1. MsgBox Application.CurrentDb.TableDefs("Table1").Properties("Description").Value
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    26

    Re: how to read table-description from MDB?

    RobDog888, thanks a lot for your attention

    but I've checked the whole collection "Properties(...)" for TableDef:
    VB Code:
    1. Dim propItem As Property
    2.       For Each propItem In jetDB.TableDefs(strTableName).Properties
    3.          Debug.Print propItem.Name & " = " & propItem.Value
    4.       Next
    and I've got only these Properties:
    Name = Table1
    Updatable = False
    DateCreated = 06.12.2005 11:28:22
    LastUpdated = 16.02.2006 16:41:56
    Connect = dBase III;HDR=NO;IMEX=2;DATABASE=C:\MyTables
    Attributes = 1073741824
    SourceTableName = Table1.dbf
    RecordCount = -1
    ValidationRule =
    ValidationText =
    ConflictTable =
    ReplicaFilter =
    Orientation = 0
    OrderByOn = False
    DefaultView = 2
    there is no "Description" in this list

    Maybe exist another way to get this "Description" for Table?

    kind regards,
    Baloo.

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Dec 2005
    Posts
    26

    Re: how to read table-description from MDB?

    o sorry, RobDog888, I didn't described all details, you was absolutely right:
    I've tried it in Access:
    VB Code:
    1. Application.CurrentDb.TableDefs("Table1").Properties("Description").Value
    and in Access IT WORKS!
    But I'm working in WORD.VBA and trying to read MDB from WORD.VBA
    And threre is no such Property in WORD as stated previous message.

    Could you pls say - how can I read this Property "Description" for Table exactly from WORD?

    kind regards,
    Baloo.

  7. #7
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: how to read the MDB-Table description from WORD?

    Sure, just add a reference to Access xx.0 Object Library in your Words VBA IDE and use some code to create a new instance of Access application and open you db. Then the code I posted will work.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

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



Click Here to Expand Forum to Full Width