This runs fine within Access from the design view but has a syntax error when running from witin vba. Any eagle eyes?
Also, on this one I just can't get the syntax right. It has a problem in the syntax for the dbf file. The file is supposed to end up C:\Test\NS.dbf
Code:
strSQL = "SELECT AllDisp.[Disposition Number], [lsd] & "-" & [section] & "-" & [twp] & "-" & [rge] & "W" & [m] AS lands INTO tblCreateNewLands " & _
"FROM AllDisp INNER JOIN (Claim_Lands LEFT JOIN ConversionTAbleLSD ON Claim_Lands.Qualifier = ConversionTAbleLSD.Portion) ON AllDisp.id = Claim_Lands.ALLdispConnect " & _
"WHERE (((AllDisp.[Disposition Number])>"S-142330") AND ((AllDisp.[Current Status])="ACTIVE") AND ((AllDisp.[Mining District])="S"));"
Also, on this one I just can't get the syntax right. It has a problem in the syntax for the dbf file. The file is supposed to end up C:\Test\NS.dbf
Code:
"SELECT LSDShape.LSDShapeTable_PPID, tblCreateNewLands.[Disposition Number] INTO NS IN 'dBase V;DATABASE=C:\Temp.NS'" & _
"FROM LSDShape INNER JOIN tblCreateNewLands ON LSDShape.Land = tblCreateNewLands.lands;"