I want to get the number of records updated by a updatequery
NB!The updatequery has a criteria =[Forms]![Myform]![myfield]
So I tought I could use the recordsaffected after a execute on a querydef object but....
Here is my code
Dim dbs As Database, qdf As QueryDef
Dim strSQL As String
Set dbs = CurrentDb
Set qdf = dbs.QueryDefs("MyUpdateQuery")
Set dbs = Nothing
What is happen is that I get error in the execute line saying "to few parameters expecting 1
If I anlyze the qdf.perameters the value are empty, but instead the qdf.name property are set to [Forms]![Myform]![myfield]
So the thin I want to know is:
Is this a bug in access?? Does anybody have a workaround??
PS If I use a criteria ex 2 in my query it works OK
PPS Yes I do have the form open and YES I can run the query with no problem from the databasewindow