March 27th, 2007, 8:55 am
I think you also want to be going:qdf.Parameters("AsOfDate")="01/01/2007"rather than trying to set the value of a field (which sound a bit wierd!). I'm guessing you might really want it to be a data, not a string you're passing in, ieqdf.Parameters("AsOfDate") = #01-Jan-2007#What are you intending to do with the query afterwards? Even with these changes it won't actually do anything, you'll just be setting a parameter. This won't be reflected when you go to open any of the queries. Of course you may have removed some lines of code for clarity, and a iterating through the result set, which would work. If, however, what you are tryign to do is set a whole bunch of queries to open up for your given value date next time you open them, I'd suggest creating a one-row, one-field table, which you populate with your query date. Then your queries can just be linked onto that table, and you wouldn't need parameters.