Linked Table Manager Doesn't Work in Access 2003

D

dnitz

I recently upgraded to Access 2003 and have found that the menu option:
Tools/Database Utilities/Linked Table Manager no longer works correctly for
re-linking my front end database to the backend. No tables show in the table
list. If I click “Select All†and then fill in the path to the backend
database I get the following error message: Method ‘List’ of object
‘IfieldListWnd’ failed. As a work around I have to delete all the table
links from the front-end and then File/Get External Data/Link Tables. Is
anybody else having this problem?

Thanks in advance for your help.
 
J

Joan Wild

dnitz said:
I recently upgraded to Access 2003 and have found that the menu option:
Tools/Database Utilities/Linked Table Manager no longer works correctly
for
re-linking my front end database to the backend. No tables show in the
table
list.

Re-register accwiz.dll (the one located in the same folder where Access 2003
is installed)

Regsvr32 "path\ACCWIZ.DLL"
See
http://support.microsoft.com/?id=835519
 
D

dnitz

Joan,

Thank you for the information. I located the correct version of the
Accwiz.dll and tried to register it but the command fails. I ran the
following command:
regsvr32.exe C:\Program Files\Microsoft Office\OFFICE11\accwiz.dll

I received the following error message:
LoadLibrary Failed ("C:\Program") failed-The specified module could not be
found.
 
J

Joan Wild

dnitz said:
Joan,

Thank you for the information. I located the correct version of the
Accwiz.dll and tried to register it but the command fails. I ran the
following command:
regsvr32.exe C:\Program Files\Microsoft Office\OFFICE11\accwiz.dll

I received the following error message:
LoadLibrary Failed ("C:\Program") failed-The specified module could not be
found.


You need to enclose the path in double quotes because it has a space in it.
regsvr32.exe "C:\Program Files\Microsoft Office\Office11\accwiz.dll"
 
A

Albert D.Kallal

regsvr32.exe C:\Program Files\Microsoft Office\OFFICE11\accwiz.dll


Try putting quotes around the above

so, go start->run, and paste in

regsvr32.exe "C:\Program Files\Microsoft Office\OFFICE11\accwiz.dll"
 
D

dnitz

Joan and Albert,

Thanks to both of you. It worked like a charm and my Linked Table Manager
is now working correctly.
 
R

Rodolfo Licea

I follow the instructions but did nt work for me.
Run from the command prompt. Got a message succeded!!
Run from a batch file. Got a message succeded!!
Went to the registry and change it manually.

I do not know what to do please help, thanks
 
R

Rodolfo Licea

I follow the instructions but did nt work for me.
Run from the command prompt. Got a message succeded!!
Run from a batch file. Got a message succeded!!
Went to the registry and change it manually.

In my case works through VB Code and this is the code:
Dim varX As Variant
On Error GoTo Link_Err
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
' Define message.
Msg = "This procedure should be run only once to establish a connection" &
vbNewLine & _
"between the Audit Trails and this application, do you want to
continue ?"
' Define buttons.
Style = vbYesNo + vbCritical + vbDefaultButton2
' Define title.
Title = "Link Tables from CS Audit Trails"
' Define Help file
Help = "DEMO.HLP"
Ctxt = 1000 ' Define topic
' context.
' Display message.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then ' User chose Yes.

strNewPath = Application.CurrentProject.Path & "."
DoCmd.DeleteObject acTable, "Step 01: A-001"
DoCmd.TransferSpreadsheet acLink, 8, "Step 01: A-001", strNewPath & "\" &
"A-0001- Assignment Profile.xls", True, "ToAccess"

varX = DLookup("[StatewidePEP]", "Step 01: A-001")

If varX = "Y" Then
Msg = "You have chosen to link audit trails for a state that uses Lines
8 and 9 " & vbNewLine & _
"to calculate the PEP Indicator, do you want to continue ?"
Style = vbYesNo + vbCritical + vbDefaultButton2 ' Define buttons.
Title = "Link Tables from CS Audit Trails" ' Define title.
Help = "DEMO.HLP" ' Define Help file.
Ctxt = 1000 ' Define topic
' context.
' Display message.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)

If Response = vbYes Then ' User chose Yes.
strNewPath = Application.CurrentProject.Path & "."
DoCmd.DeleteObject acTable, "Step 01: IVDUniverse"
DoCmd.DeleteObject acTable, "Step 01: Line01"
DoCmd.DeleteObject acTable, "Step 01: Line02"
DoCmd.DeleteObject acTable, "Step 01: Line05"
DoCmd.DeleteObject acTable, "Step 01: Line06"
DoCmd.DeleteObject acTable, "Step 01: Line08"
DoCmd.DeleteObject acTable, "Step 01: Line09"
DoCmd.DeleteObject acTable, "Step 01: Line24"
DoCmd.DeleteObject acTable, "Step 01: Line25"
DoCmd.DeleteObject acTable, "Step 01: Line28"
DoCmd.DeleteObject acTable, "Step 01: Line29"
DoCmd.DeleteObject acTable, "Step 01:
Program_Log_Range"
DoCmd.DeleteObject acTable, "Step 01: A-001"

'=======================================================
'Medical Support Section 07/03/06

'=======================================================
DoCmd.DeleteObject acTable, "Step 01: Line02e"
DoCmd.DeleteObject acTable, "Step 01: Line21"
DoCmd.DeleteObject acTable, "Step 01: Line21a"

DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "IVDUniverse",
"Step 01: IVDUniverse", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line01", "Step 01:
Line01", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line02", "Step 01:
Line02", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line05", "Step 01:
Line05", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line06", "Step 01:
Line06", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line08", "Step 01:
Line08", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line09", "Step 01:
Line09", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line24", "Step 01:
Line24", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line25", "Step 01:
Line25", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line28", "Step 01:
Line28", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line29", "Step 01:
Line29", False
DoCmd.TransferSpreadsheet acImport, 8, "Step 01:
Program_Log_Range", strNewPath & "\" & "D-2011- Sample Selection for IV-D
System Universe.xls", True, "Program_Log_Range"
DoCmd.TransferSpreadsheet acImport, 8, "Step 01: A-001",
strNewPath & "\" & "A-0001- Assignment Profile.xls", True, "ToAccess"

'=======================================================
'Medical Support Section 07/03/06

'=======================================================
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line02e", "Step
01: Line02e", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line21", "Step 01:
Line21", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line21a", "Step
01: Line21a", False


Else ' User chose No.
Exit Function
End If
Else
Msg = "You have chosen to link audit trails for a state that
uses Lines 5 and 6" & vbNewLine & _
"to calculate the PEP indicator." & vbNewLine & _
"Do you want to continue ?"
Style = vbYesNo + vbCritical + vbDefaultButton2 ' Define
buttons.
Title = "Link Tables from CS Audit Trails" ' Define title.
Help = "DEMO.HLP" ' Define Help file.
Ctxt = 1000 ' Define topic
' context.
' Display message.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)

If Response = vbYes Then ' User chose Yes.
strNewPath = Application.CurrentProject.Path & "."
DoCmd.DeleteObject acTable, "Step 01: IVDUniverse"
DoCmd.DeleteObject acTable, "Step 01: Line01"
DoCmd.DeleteObject acTable, "Step 01: Line02"
DoCmd.DeleteObject acTable, "Step 01: Line05"
DoCmd.DeleteObject acTable, "Step 01: Line06"
'DoCmd.DeleteObject acTable, "Step 01: Line08"
'DoCmd.DeleteObject acTable, "Step 01: Line09"
DoCmd.DeleteObject acTable, "Step 01: Line24"
DoCmd.DeleteObject acTable, "Step 01: Line25"
DoCmd.DeleteObject acTable, "Step 01: Line28"
DoCmd.DeleteObject acTable, "Step 01: Line29"
DoCmd.DeleteObject acTable, "Step 01: A-001"
DoCmd.DeleteObject acTable, "Step 01:
Program_Log_Range"
'Medical Support Section 07/03/06

'=======================================================
DoCmd.DeleteObject acTable, "Step 01: Line02e"
DoCmd.DeleteObject acTable, "Step 01: Line21"
DoCmd.DeleteObject acTable, "Step 01: Line21a"



DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "IVDUniverse",
"Step 01: IVDUniverse", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line01", "Step 01:
Line01", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line02", "Step 01:
Line02", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line05", "Step 01:
Line05", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line06", "Step 01:
Line06", False
'DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line08", "Step 01:
Line08", False
'DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line09", "Step 01:
Line09", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line24", "Step 01:
Line24", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line25", "Step 01:
Line25", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line28", "Step 01:
Line28", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line29", "Step 01:
Line29", False
DoCmd.TransferSpreadsheet acImport, 8, "Step 01: A-001",
strNewPath & "\" & "A-0001- Assignment Profile.xls", True, "ToAccess"
DoCmd.TransferSpreadsheet acImport, 8, "Step 01:
Program_Log_Range", strNewPath & "\" & "D-2011- Sample Selection for IV-D
System Universe.xls", True, "Program_Log_Range"


'=======================================================
'Medical Support Section 07/03/06

'=======================================================
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line02e", "Step
01: Line02e", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line21", "Step 01:
Line21", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line21a", "Step
01: Line21a", False


Else ' User chose No.
Exit Function
End If
End If
Else
Exit Function
End If
Link_Err:
Response = MsgBox("Audit Trails Tables have been linked, press OK to
continue", vbOKOnly)
End Function


I do not know what to do please help, thanks
 
C

Chris Mills

You headed this "Linked Table Manager Doesn't Work"

Linking tables works fine, and always has. Whether through the Manager or
anything else.

Your code indicates you are doing dozens or hundreds DeleteObjects,
TransferDatabase, TransferSpreadsheet, and goodness knows what else (well,
specifying HELP files is mentioned!). You must have taken some code from some
other program and expect it to work in your own program WITHOUT UNDERSTANDING.
NONE of those things have any relevance to "linking tables".

It's also hard to give a short lesson, in a newsgroup devoted to individual
technical problems, on how to begin to understand Microsoft Access and VBA..

Before proceeding further with this, my summary is that your best bet is to a)
find someone to work with who has a basic understanding of Access and VBA code
b) take some sort of course on it c) take the sample Northwind database and
make simple modifications ONE AT A TIME to see what happens and understand
every step d) I dont know really, no single answer can give you the
understanding of Access that you need. Based on the jumble of code you
presented, "Linking Tables" is the least of your problems. Employ someone?

Chris

Rodolfo Licea said:
I follow the instructions but did nt work for me.
Run from the command prompt. Got a message succeded!!
Run from a batch file. Got a message succeded!!
Went to the registry and change it manually.

In my case works through VB Code and this is the code:
Dim varX As Variant
On Error GoTo Link_Err
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
' Define message.
Msg = "This procedure should be run only once to establish a connection" &
vbNewLine & _
"between the Audit Trails and this application, do you want to
continue ?"
' Define buttons.
Style = vbYesNo + vbCritical + vbDefaultButton2
' Define title.
Title = "Link Tables from CS Audit Trails"
' Define Help file
Help = "DEMO.HLP"
Ctxt = 1000 ' Define topic
' context.
' Display message.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then ' User chose Yes.

strNewPath = Application.CurrentProject.Path & "."
DoCmd.DeleteObject acTable, "Step 01: A-001"
DoCmd.TransferSpreadsheet acLink, 8, "Step 01: A-001", strNewPath & "\" &
"A-0001- Assignment Profile.xls", True, "ToAccess"

varX = DLookup("[StatewidePEP]", "Step 01: A-001")

If varX = "Y" Then
Msg = "You have chosen to link audit trails for a state that uses Lines
8 and 9 " & vbNewLine & _
"to calculate the PEP Indicator, do you want to continue ?"
Style = vbYesNo + vbCritical + vbDefaultButton2 ' Define buttons.
Title = "Link Tables from CS Audit Trails" ' Define title.
Help = "DEMO.HLP" ' Define Help file.
Ctxt = 1000 ' Define topic
' context.
' Display message.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)

If Response = vbYes Then ' User chose Yes.
strNewPath = Application.CurrentProject.Path & "."
DoCmd.DeleteObject acTable, "Step 01: IVDUniverse"
DoCmd.DeleteObject acTable, "Step 01: Line01"
DoCmd.DeleteObject acTable, "Step 01: Line02"
DoCmd.DeleteObject acTable, "Step 01: Line05"
DoCmd.DeleteObject acTable, "Step 01: Line06"
DoCmd.DeleteObject acTable, "Step 01: Line08"
DoCmd.DeleteObject acTable, "Step 01: Line09"
DoCmd.DeleteObject acTable, "Step 01: Line24"
DoCmd.DeleteObject acTable, "Step 01: Line25"
DoCmd.DeleteObject acTable, "Step 01: Line28"
DoCmd.DeleteObject acTable, "Step 01: Line29"
DoCmd.DeleteObject acTable, "Step 01:
Program_Log_Range"
DoCmd.DeleteObject acTable, "Step 01: A-001"

'=======================================================
'Medical Support Section 07/03/06

'=======================================================
DoCmd.DeleteObject acTable, "Step 01: Line02e"
DoCmd.DeleteObject acTable, "Step 01: Line21"
DoCmd.DeleteObject acTable, "Step 01: Line21a"

DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "IVDUniverse",
"Step 01: IVDUniverse", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line01", "Step 01:
Line01", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line02", "Step 01:
Line02", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line05", "Step 01:
Line05", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line06", "Step 01:
Line06", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line08", "Step 01:
Line08", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line09", "Step 01:
Line09", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line24", "Step 01:
Line24", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line25", "Step 01:
Line25", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line28", "Step 01:
Line28", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line29", "Step 01:
Line29", False
DoCmd.TransferSpreadsheet acImport, 8, "Step 01:
Program_Log_Range", strNewPath & "\" & "D-2011- Sample Selection for IV-D
System Universe.xls", True, "Program_Log_Range"
DoCmd.TransferSpreadsheet acImport, 8, "Step 01: A-001",
strNewPath & "\" & "A-0001- Assignment Profile.xls", True, "ToAccess"

'=======================================================
'Medical Support Section 07/03/06

'=======================================================
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line02e", "Step
01: Line02e", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line21", "Step 01:
Line21", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line21a", "Step
01: Line21a", False


Else ' User chose No.
Exit Function
End If
Else
Msg = "You have chosen to link audit trails for a state that
uses Lines 5 and 6" & vbNewLine & _
"to calculate the PEP indicator." & vbNewLine & _
"Do you want to continue ?"
Style = vbYesNo + vbCritical + vbDefaultButton2 ' Define
buttons.
Title = "Link Tables from CS Audit Trails" ' Define title.
Help = "DEMO.HLP" ' Define Help file.
Ctxt = 1000 ' Define topic
' context.
' Display message.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)

If Response = vbYes Then ' User chose Yes.
strNewPath = Application.CurrentProject.Path & "."
DoCmd.DeleteObject acTable, "Step 01: IVDUniverse"
DoCmd.DeleteObject acTable, "Step 01: Line01"
DoCmd.DeleteObject acTable, "Step 01: Line02"
DoCmd.DeleteObject acTable, "Step 01: Line05"
DoCmd.DeleteObject acTable, "Step 01: Line06"
'DoCmd.DeleteObject acTable, "Step 01: Line08"
'DoCmd.DeleteObject acTable, "Step 01: Line09"
DoCmd.DeleteObject acTable, "Step 01: Line24"
DoCmd.DeleteObject acTable, "Step 01: Line25"
DoCmd.DeleteObject acTable, "Step 01: Line28"
DoCmd.DeleteObject acTable, "Step 01: Line29"
DoCmd.DeleteObject acTable, "Step 01: A-001"
DoCmd.DeleteObject acTable, "Step 01:
Program_Log_Range"
'Medical Support Section 07/03/06

'=======================================================
DoCmd.DeleteObject acTable, "Step 01: Line02e"
DoCmd.DeleteObject acTable, "Step 01: Line21"
DoCmd.DeleteObject acTable, "Step 01: Line21a"



DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "IVDUniverse",
"Step 01: IVDUniverse", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line01", "Step 01:
Line01", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line02", "Step 01:
Line02", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line05", "Step 01:
Line05", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line06", "Step 01:
Line06", False
'DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line08", "Step 01:
Line08", False
'DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line09", "Step 01:
Line09", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line24", "Step 01:
Line24", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line25", "Step 01:
Line25", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line28", "Step 01:
Line28", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line29", "Step 01:
Line29", False
DoCmd.TransferSpreadsheet acImport, 8, "Step 01: A-001",
strNewPath & "\" & "A-0001- Assignment Profile.xls", True, "ToAccess"
DoCmd.TransferSpreadsheet acImport, 8, "Step 01:
Program_Log_Range", strNewPath & "\" & "D-2011- Sample Selection for IV-D
System Universe.xls", True, "Program_Log_Range"


'=======================================================
'Medical Support Section 07/03/06

'=======================================================
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line02e", "Step
01: Line02e", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line21", "Step 01:
Line21", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line21a", "Step
01: Line21a", False


Else ' User chose No.
Exit Function
End If
End If
Else
Exit Function
End If
Link_Err:
Response = MsgBox("Audit Trails Tables have been linked, press OK to
continue", vbOKOnly)
End Function


I do not know what to do please help, thanks
 
T

Tom Wickernards

no it doesn't work

it doesn't change the connection string on Sql Passthru queries, for example

It is no longer reccomended to use linked tabels for any reason.
you should move to Access Data Projects utilizing freeware SQL Server



Chris Mills said:
You headed this "Linked Table Manager Doesn't Work"

Linking tables works fine, and always has. Whether through the Manager or
anything else.

Your code indicates you are doing dozens or hundreds DeleteObjects,
TransferDatabase, TransferSpreadsheet, and goodness knows what else (well,
specifying HELP files is mentioned!). You must have taken some code from
some
other program and expect it to work in your own program WITHOUT
UNDERSTANDING.
NONE of those things have any relevance to "linking tables".

It's also hard to give a short lesson, in a newsgroup devoted to
individual
technical problems, on how to begin to understand Microsoft Access and
VBA..

Before proceeding further with this, my summary is that your best bet is
to a)
find someone to work with who has a basic understanding of Access and VBA
code
b) take some sort of course on it c) take the sample Northwind database
and
make simple modifications ONE AT A TIME to see what happens and understand
every step d) I dont know really, no single answer can give you the
understanding of Access that you need. Based on the jumble of code you
presented, "Linking Tables" is the least of your problems. Employ someone?

Chris

Rodolfo Licea said:
I follow the instructions but did nt work for me.
Run from the command prompt. Got a message succeded!!
Run from a batch file. Got a message succeded!!
Went to the registry and change it manually.

In my case works through VB Code and this is the code:
Dim varX As Variant
On Error GoTo Link_Err
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
' Define message.
Msg = "This procedure should be run only once to establish a connection"
&
vbNewLine & _
"between the Audit Trails and this application, do you want
to
continue ?"
' Define buttons.
Style = vbYesNo + vbCritical + vbDefaultButton2
' Define title.
Title = "Link Tables from CS Audit Trails"
' Define Help file
Help = "DEMO.HLP"
Ctxt = 1000 ' Define topic
' context.
' Display message.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then ' User chose Yes.

strNewPath = Application.CurrentProject.Path & "."
DoCmd.DeleteObject acTable, "Step 01: A-001"
DoCmd.TransferSpreadsheet acLink, 8, "Step 01: A-001", strNewPath & "\" &
"A-0001- Assignment Profile.xls", True, "ToAccess"

varX = DLookup("[StatewidePEP]", "Step 01: A-001")

If varX = "Y" Then
Msg = "You have chosen to link audit trails for a state that uses
Lines
8 and 9 " & vbNewLine & _
"to calculate the PEP Indicator, do you want to continue
?"
Style = vbYesNo + vbCritical + vbDefaultButton2 ' Define buttons.
Title = "Link Tables from CS Audit Trails" ' Define title.
Help = "DEMO.HLP" ' Define Help file.
Ctxt = 1000 ' Define topic
' context.
' Display message.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)

If Response = vbYes Then ' User chose Yes.
strNewPath = Application.CurrentProject.Path & "."
DoCmd.DeleteObject acTable, "Step 01: IVDUniverse"
DoCmd.DeleteObject acTable, "Step 01: Line01"
DoCmd.DeleteObject acTable, "Step 01: Line02"
DoCmd.DeleteObject acTable, "Step 01: Line05"
DoCmd.DeleteObject acTable, "Step 01: Line06"
DoCmd.DeleteObject acTable, "Step 01: Line08"
DoCmd.DeleteObject acTable, "Step 01: Line09"
DoCmd.DeleteObject acTable, "Step 01: Line24"
DoCmd.DeleteObject acTable, "Step 01: Line25"
DoCmd.DeleteObject acTable, "Step 01: Line28"
DoCmd.DeleteObject acTable, "Step 01: Line29"
DoCmd.DeleteObject acTable, "Step 01:
Program_Log_Range"
DoCmd.DeleteObject acTable, "Step 01: A-001"

'=======================================================
'Medical Support Section 07/03/06

'=======================================================
DoCmd.DeleteObject acTable, "Step 01: Line02e"
DoCmd.DeleteObject acTable, "Step 01: Line21"
DoCmd.DeleteObject acTable, "Step 01: Line21a"

DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "IVDUniverse",
"Step 01: IVDUniverse", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line01", "Step
01:
Line01", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line02", "Step
01:
Line02", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line05", "Step
01:
Line05", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line06", "Step
01:
Line06", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line08", "Step
01:
Line08", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line09", "Step
01:
Line09", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line24", "Step
01:
Line24", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line25", "Step
01:
Line25", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line28", "Step
01:
Line28", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line29", "Step
01:
Line29", False
DoCmd.TransferSpreadsheet acImport, 8, "Step 01:
Program_Log_Range", strNewPath & "\" & "D-2011- Sample Selection for IV-D
System Universe.xls", True, "Program_Log_Range"
DoCmd.TransferSpreadsheet acImport, 8, "Step 01:
A-001",
strNewPath & "\" & "A-0001- Assignment Profile.xls", True, "ToAccess"

'=======================================================
'Medical Support Section 07/03/06

'=======================================================
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line02e", "Step
01: Line02e", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line21", "Step
01:
Line21", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line21a", "Step
01: Line21a", False


Else ' User chose No.
Exit Function
End If
Else
Msg = "You have chosen to link audit trails for a state that
uses Lines 5 and 6" & vbNewLine & _
"to calculate the PEP indicator." & vbNewLine & _
"Do you want to continue ?"
Style = vbYesNo + vbCritical + vbDefaultButton2 ' Define
buttons.
Title = "Link Tables from CS Audit Trails" ' Define title.
Help = "DEMO.HLP" ' Define Help file.
Ctxt = 1000 ' Define topic
' context.
' Display message.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)

If Response = vbYes Then ' User chose Yes.
strNewPath = Application.CurrentProject.Path & "."
DoCmd.DeleteObject acTable, "Step 01: IVDUniverse"
DoCmd.DeleteObject acTable, "Step 01: Line01"
DoCmd.DeleteObject acTable, "Step 01: Line02"
DoCmd.DeleteObject acTable, "Step 01: Line05"
DoCmd.DeleteObject acTable, "Step 01: Line06"
'DoCmd.DeleteObject acTable, "Step 01: Line08"
'DoCmd.DeleteObject acTable, "Step 01: Line09"
DoCmd.DeleteObject acTable, "Step 01: Line24"
DoCmd.DeleteObject acTable, "Step 01: Line25"
DoCmd.DeleteObject acTable, "Step 01: Line28"
DoCmd.DeleteObject acTable, "Step 01: Line29"
DoCmd.DeleteObject acTable, "Step 01: A-001"
DoCmd.DeleteObject acTable, "Step 01:
Program_Log_Range"
'Medical Support Section 07/03/06

'=======================================================
DoCmd.DeleteObject acTable, "Step 01: Line02e"
DoCmd.DeleteObject acTable, "Step 01: Line21"
DoCmd.DeleteObject acTable, "Step 01: Line21a"



DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "IVDUniverse",
"Step 01: IVDUniverse", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line01", "Step
01:
Line01", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line02", "Step
01:
Line02", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line05", "Step
01:
Line05", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line06", "Step
01:
Line06", False
'DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line08", "Step
01:
Line08", False
'DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line09", "Step
01:
Line09", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line24", "Step
01:
Line24", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line25", "Step
01:
Line25", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line28", "Step
01:
Line28", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line29", "Step
01:
Line29", False
DoCmd.TransferSpreadsheet acImport, 8, "Step 01:
A-001",
strNewPath & "\" & "A-0001- Assignment Profile.xls", True, "ToAccess"
DoCmd.TransferSpreadsheet acImport, 8, "Step 01:
Program_Log_Range", strNewPath & "\" & "D-2011- Sample Selection for IV-D
System Universe.xls", True, "Program_Log_Range"


'=======================================================
'Medical Support Section 07/03/06

'=======================================================
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line02e", "Step
01: Line02e", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line21", "Step
01:
Line21", False
DoCmd.TransferDatabase acLink, "Microsoft Access",
strNewPath & "\" & "D-2002- CSAuditTrails.mdb", acTable, "Line21a", "Step
01: Line21a", False


Else ' User chose No.
Exit Function
End If
End If
Else
Exit Function
End If
Link_Err:
Response = MsgBox("Audit Trails Tables have been linked, press OK to
continue", vbOKOnly)
End Function


I do not know what to do please help, thanks
 
S

Scalf

Thank you so much. I have been looking for this answer for months. There
are so many wrong ones out there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top