Help With Code

KurtRos

New member
Local time
Today, 04:00
Joined
Feb 7, 2007
Messages
6
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:

:confused: Set rstpath = dbs.openrecordset(“SELECT TablePath FROM tbl_DC_Table_Paths where DC=’ “ & strdc & “’;”

:confused: 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>>>>
 
What kind of error are you getting?
 
Error

Compile Error Syntax Error
 
OK SO I fixed it I was missing close parenthesis ha-ha..

So now I got new error:

Object does not support this property or method
 

Users who are viewing this thread

Back
Top Bottom