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
Chris Mills - 21 Jun 2007 06:31 GMT
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
> I follow the instructions but did nt work for me.
> Run from the command prompt. Got a message succeded!!
[quoted text clipped - 225 lines]
>
> I do not know what to do please help, thanks
Tom Wickernards - 25 Jun 2007 14:25 GMT
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
> You headed this "Linked Table Manager Doesn't Work"
>
[quoted text clipped - 284 lines]
>>
>> I do not know what to do please help, thanks