R
Rudy W.
Dim dbsTest As DAO.Database
Dim strTest As String
Dim rstTest As DAO.Recordset
strTest = "SELECT Val([Forms]![frmTest]![testField]) As
test FROM tblTestFields WHERE fieldname = 'testField';"
Set rstTest = dbsTest.OpenRecordset(strTest,dbOpenDynaset)
Gives an error:
3061 Too few parameters. Expected 1
The form "frmTest" is open and the field "testField" is
accessable on the moment of the execution.
Also the tabel "tblTestFields" is available and there is
a record with value 'testField' for the field "fieldname".
When I run the same query:
SELECT Val([Forms]![frmTest]![testField]) As test FROM
tblTestFields WHERE fieldname = 'testField';
direct from the query chapter, I get a valid result
without errors.
Thanks
R.W.
Dim strTest As String
Dim rstTest As DAO.Recordset
strTest = "SELECT Val([Forms]![frmTest]![testField]) As
test FROM tblTestFields WHERE fieldname = 'testField';"
Set rstTest = dbsTest.OpenRecordset(strTest,dbOpenDynaset)
Gives an error:
3061 Too few parameters. Expected 1
The form "frmTest" is open and the field "testField" is
accessable on the moment of the execution.
Also the tabel "tblTestFields" is available and there is
a record with value 'testField' for the field "fieldname".
When I run the same query:
SELECT Val([Forms]![frmTest]![testField]) As test FROM
tblTestFields WHERE fieldname = 'testField';
direct from the query chapter, I get a valid result
without errors.
Thanks
R.W.