Hey everyone I guess I'm having a moment of fatigue or something.. I have a problem with my code and cant seem to find it.. I'm sure its simple but for some reason I dont see it... Do you see anything??
I think its in these:
Set rstpath = dbs.openrecordset(“SELECT TablePath FROM tbl_DC_Table_Paths where DC=’ “ & strdc & “’;”
Set rst=dbs.openrecordset(“SELECT TableName FROM tbl_Table_List;”)
'<<<<START ACTUAL CODE>>>>
Dim strDC As String
Dim strPath As String
Dim dbs As DAO.database
Dim rst As DAO.Recordset
Dim rstPath As DAO.Recordset
strDC = Forms(“frm_DC_Selection_Menu”).Controls(“DC”).Value
Set dbs = CurrentDb
Set rstpath = dbs.openrecordset(“SELECT TablePath FROM tbl_DC_Table_Paths where DC=’ “ & strdc & “’;”
strPath = rstPath.Fields(0).Value
Set rst=dbs.openrecordset(“SELECT TableName FROM tbl_Table_List;”)
With rst
.MoveFirst
Do Until .EOF
DoCmd.TransferDatabase acLink, , strPath & “ \ ” & .Fields(“TableName”).Value
.MoveNext
Loop
End With
'<<<<END CODE>>>>
I think its in these:
'<<<<START ACTUAL CODE>>>>
Dim strDC As String
Dim strPath As String
Dim dbs As DAO.database
Dim rst As DAO.Recordset
Dim rstPath As DAO.Recordset
strDC = Forms(“frm_DC_Selection_Menu”).Controls(“DC”).Value
Set dbs = CurrentDb
Set rstpath = dbs.openrecordset(“SELECT TablePath FROM tbl_DC_Table_Paths where DC=’ “ & strdc & “’;”
strPath = rstPath.Fields(0).Value
Set rst=dbs.openrecordset(“SELECT TableName FROM tbl_Table_List;”)
With rst
.MoveFirst
Do Until .EOF
DoCmd.TransferDatabase acLink, , strPath & “ \ ” & .Fields(“TableName”).Value
.MoveNext
Loop
End With
'<<<<END CODE>>>>