I have a stored query that references a Form variable:
select Count(*) as Foo
From sometable
where (((sometable.somefield) = [Forms]![SomeForm].[SomeObject]);
The MS Access knowledgebase is suggesting that I use this code to access a Query ... but I get an error saying there are too few parameters being passed ... Run-time Error 3061
Expecting 1
Dim dbo As DAO.Database
Dim rsc As DAO.Recordset
Set dbo = CurrentDb
Set rsc = db
penRecordset("SomeQuery")
I presume this has to do with the Forms!SomeForm.SomeObject?
the DAO.QueryDef has a parameters option but I can't seem to get the syntax right
Can someone please push me in the right direction.
select Count(*) as Foo
From sometable
where (((sometable.somefield) = [Forms]![SomeForm].[SomeObject]);
The MS Access knowledgebase is suggesting that I use this code to access a Query ... but I get an error saying there are too few parameters being passed ... Run-time Error 3061
Expecting 1
Dim dbo As DAO.Database
Dim rsc As DAO.Recordset
Set dbo = CurrentDb
Set rsc = db
I presume this has to do with the Forms!SomeForm.SomeObject?
the DAO.QueryDef has a parameters option but I can't seem to get the syntax right
Can someone please push me in the right direction.