Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Au secours Erreur 3061 (Too few parameters)

1 réponse
Avatar
Laurent
Bonjour à tous !

Tout d'abord, j'espère que vous avez passé un excellent week-end.

Pour en venir à ma question ... Je suis à la limite de passer mon ordinateur
par la fenêtre grrrrrrr

J'ai le code suivant :

[...]

strSQLString = "SELECT tbCoord_Global.sName, tbCoord_Global.Easting,
tbCoord_Global.Northing, " & _
"tbCoord_Global.Type, tbCoord_Global.Type_long, tbCoord_Global.Height,
tbCoord_Global.Latitude, " & _
"tbCoord_Global.Longitude, tbCoord_Global.vAltitude, " & _
"fcnIsWithinCircleRadius([Forms]![frmCircleRadiusSearch]![Easting]," & _
"[Forms]![frmCircleRadiusSearch]![Northing]," & _
"[Forms]![frmCircleRadiusSearch]![vRadius]," & _
"[Easting]," & _
"[Northing]) " & _
"AS Test_Within_Circle " & _
"FROM tbCoord_Global " & _
"WHERE
(((fcnIsWithinCircleRadius([Forms]![frmCircleRadiusSearch]![Easting]," & _
"[Forms]![frmCircleRadiusSearch]![Northing]," & _
"[Forms]![frmCircleRadiusSearch]![vRadius]," & _
"[Easting]," & _
"[Northing]))=True)) " & _
"ORDER BY tbCoord_Global.sName;"

[...]

et là, il refuse de me faire un CurrentDb.OpenRecordset(strSQLString,
dbOpenDynaset) .

Pourtant, si je reprend la chaîne de cette syntaxe et que je la place
directement dans une requête SQL, j'obtiens des réponses.

Une chtite idée ?

Merci et bonne après-midl.
Laurent

1 réponse

Avatar
3stone
Salut,

"Laurent"
| J'ai le code suivant :
|
| [...]
|
| strSQLString = "SELECT tbCoord_Global.sName, tbCoord_Global.Easting,
| tbCoord_Global.Northing, " & _
| "tbCoord_Global.Type, tbCoord_Global.Type_long, tbCoord_Global.Height,
| tbCoord_Global.Latitude, " & _
| "tbCoord_Global.Longitude, tbCoord_Global.vAltitude, " & _
| "fcnIsWithinCircleRadius([Forms]![frmCircleRadiusSearch]![Easting]," & _
| "[Forms]![frmCircleRadiusSearch]![Northing]," & _
| "[Forms]![frmCircleRadiusSearch]![vRadius]," & _
| "[Easting]," & _
| "[Northing]) " & _
| "AS Test_Within_Circle " & _
| "FROM tbCoord_Global " & _
| "WHERE
| (((fcnIsWithinCircleRadius([Forms]![frmCircleRadiusSearch]![Easting]," & _
| "[Forms]![frmCircleRadiusSearch]![Northing]," & _
| "[Forms]![frmCircleRadiusSearch]![vRadius]," & _
| "[Easting]," & _
| "[Northing]))=True)) " & _
| "ORDER BY tbCoord_Global.sName;"
|
| [...]
|
| et là, il refuse de me faire un CurrentDb.OpenRecordset(strSQLString,
| dbOpenDynaset) .
|
| Pourtant, si je reprend la chaîne de cette syntaxe et que je la place
| directement dans une requête SQL, j'obtiens des réponses.


Essaies en sortant les "Forms!frmCircleRadius..." de la chaîne,
pour concaténer plutôt les valeurs renvoyées par ces zones de texte!

"Where (((fcnlsWithinCircleRadius(" & Forms!frmCircle... & "," & Forms!frmCircle..."


--
A+
Pierre (3stone) Access MVP
Perso: http://www.3stone.be/
MPFA: http://www.mpfa.info/ (infos générales)