0

The following code runs on a button on a form that I click and every time the button is clicked it stops at the recordset line with:

Syntax Error (Missing Operator) in query expression 'geography::STGeomFromText('POINT(-95.3098 29.8131)', 4326)'

I can't figure out what it is referring to. When I copy and paste the query in Microsoft SQL Server Management Studio it runs fine.

Dim GC As String
GC = CurrentDb.OpenRecordset("SELECT geography::STGeomFromText('POINT(-95.3098 29.8131)', 4326)")(0).Value
Dale K
  • 25,246
  • 15
  • 42
  • 71
ouch
  • 31
  • 3
  • You've tagged SQL Server **and** MS Access... can you explain why? – Dale K Sep 29 '22 at 22:56
  • That is a SQLServer function - AFAIK, Access will not recognize. If your data is in SQLServer backend, try a pass-through query. – June7 Sep 30 '22 at 01:35

0 Answers0