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 RiveraOP 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.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
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.