D
Dave F.
Hi
I'm writing a VBA routine within AutoCAD to query a Table which has a name of ALL LAYERS.
I believe it's have trouble coping with the space in the name.
Dim SqlStr As String
Set MyDB = OpenDataBase("c:\dwgs\docs\BH-Data.mdb", False, True, "MS Access;PWD=sbpl123")
SqlStr = "SELECT Layer FROM " & "'All Layers'" & " WHERE Layer = 's%'"
Set Myrs = MyDB.OpenRecordset(SqlStr)
I get an error of - Syntax error in query. incomplete query clause.
I've tried various ways inlcuding using double quotes but nothing seems to work.
This is another table query in the same database that works.
SqlStr = "SELECT Type, ID FROM LayerType WHERE Type = 'Structural'"
So where am I going wrong.
Hope you can help
Cheers
Dave F.
I'm writing a VBA routine within AutoCAD to query a Table which has a name of ALL LAYERS.
I believe it's have trouble coping with the space in the name.
Dim SqlStr As String
Set MyDB = OpenDataBase("c:\dwgs\docs\BH-Data.mdb", False, True, "MS Access;PWD=sbpl123")
SqlStr = "SELECT Layer FROM " & "'All Layers'" & " WHERE Layer = 's%'"
Set Myrs = MyDB.OpenRecordset(SqlStr)
I get an error of - Syntax error in query. incomplete query clause.
I've tried various ways inlcuding using double quotes but nothing seems to work.
This is another table query in the same database that works.
SqlStr = "SELECT Type, ID FROM LayerType WHERE Type = 'Structural'"
So where am I going wrong.
Hope you can help
Cheers
Dave F.