Computer Learning Zone CLZ Access Excel Word Windows

Nothing in life is to be feared, it is only to be understood. Now is the time to understand more, so that we may fear less.

-Marie Curie
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > Courses > Access > Seminars > Security > Lessons
Back to Security Seminar Lessons    Comments List
Upload Images   Link   Email  
Create Table Links
Leo Rivera 
    
12 months ago
Hi friends,  I was working with the Security Seminar and in the lesson 29 Richard teach about the Create and Destroy Tables link.  I did it but when I do the Create link the tables comes with number instead of their own names.  How can I fixt that?  Thks is the code that I am used:

Public Sub CreateDatabaseLinks()

    Dim ws As DAO.Workspace
    Dim db As DAO.Database
    Dim td As DAO.TableDef
    Dim Attrib As Long
    Set ws = DBEngine.Workspaces(0)
    Set db = ws.OpenDatabase(BE_DATABASE, False, False, "MS Access;PWD=" & BE_PASSWORD)
    For Each td In db.TableDefs
        Attrib = (td.Attributes And dbSystemObject)
        If Attrib = 0 Then 'not a system table
            DoCmd.TransferDatabase acLink, "Microsoft Access", db.Name, acTable, td.Name, False, False
        End If
    Next
    db.Close
    ws.Close
    Set db = Nothing
    Set ws = Nothing
    Set td = Nothing
            
    
End Sub

I will show you the tables links that is created.
Leo Rivera OP 
    
12 months ago

Kevin Robertson 
           
12 months ago
I just rewatched the lesson you referred to. In the DoCmd.TransferDatabase you are missing a parameter. If you rewatch the lesson you will notice that td.Name is mentioned twice.

DoCmd.TransferDatabase acLink, "Microsoft Access", db.Name, acTable, td.Name, td,Name, False, False
Leo Rivera OP 
    
12 months ago
Awesome you are the best!

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Security Seminar Lessons.
 

 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2025 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 1/23/2025 1:17:26 PM. PLT: 1s