OK, I've got the following Query hardcoded into my VBA, and it works beautifully, with one exception: if the query returns no results, Access crashes! Is there an if statement I can use to say (in pseudocode) if IsNull QueryResults, do this, else do that..
Anywho, heres the query (doubt it even matters)...
afilter = "Year = " & y & " and Period = " & p
Set BrokerActivity = MyDatabase.OpenRecordset("select * from BrokerData where " & afilter)
BrokerActivity.MoveFirst
TIA for any quick help!
Anywho, heres the query (doubt it even matters)...
afilter = "Year = " & y & " and Period = " & p
Set BrokerActivity = MyDatabase.OpenRecordset("select * from BrokerData where " & afilter)
BrokerActivity.MoveFirst
TIA for any quick help!