G
Guest
Can anyone tell me the correct syntax for an INSERT INTO statement which will
work from a FE on any networked machine to the BE on the server. I have the
network address for the BE in a variable called strPath but I get syntax
errors when I try to run the code, which is as follows.
DoCmd.RunSQL "INSERT INTO TableName (FieldList)" _
& " IN " 'MS Access;Database=" & strPath & "'" _
& " SELECT FieldList" _
& " FROM OtherTableName;"
Strangely, I have another piece of code which contains the identical IN
statement and works perfectly, this is
DoCmd.RunSQL "SELECT FieldList" _
& " INTO TableName" _
& " IN '' 'MS Access;Database=" & strPath & "'" _
& " FROM [Pupil details]" _
& " WHERE Field = 'XXXX'" _
& " ORDER BY Field1,Field2];"
Could anyone shed any light on this?
Many thanks, Wesley Kendrick
work from a FE on any networked machine to the BE on the server. I have the
network address for the BE in a variable called strPath but I get syntax
errors when I try to run the code, which is as follows.
DoCmd.RunSQL "INSERT INTO TableName (FieldList)" _
& " IN " 'MS Access;Database=" & strPath & "'" _
& " SELECT FieldList" _
& " FROM OtherTableName;"
Strangely, I have another piece of code which contains the identical IN
statement and works perfectly, this is
DoCmd.RunSQL "SELECT FieldList" _
& " INTO TableName" _
& " IN '' 'MS Access;Database=" & strPath & "'" _
& " FROM [Pupil details]" _
& " WHERE Field = 'XXXX'" _
& " ORDER BY Field1,Field2];"
Could anyone shed any light on this?
Many thanks, Wesley Kendrick