I have an Exel Worksheet that generates charts based upon data retrieved from an MS Access Database a server. I want to count the total number of records in a Query called ArrowElec. Then I want to count the number of records in the same Query where the field MDR is not null using the SQL function COUNT(). I have tried using the following:
SQL.REQUEST("DSN=MS Access Database; DBQ=H:\Quality\InspLog\RecInspLog.mdb",,,"SELECT COUNT(*) FROM ArrowElec WHERE ((DATE>#3/31/03#)AND(DATE<#7/1/03#)"
I was able to get the SQL.REQUEST() function to work using a db on my local drive. however, all I get is #N/A in the target cell when using the file on the network server.
Does the Access database have to be opened exclusively by the computer running the SQL.REQUEST()? I'm wondering becuase the SQL.REQUEST() seems to work when it points at an Access database that is either closed or opened exclusively by me.
Would appreciate any comments or alternate methods to accomplish the above task.
SQL.REQUEST("DSN=MS Access Database; DBQ=H:\Quality\InspLog\RecInspLog.mdb",,,"SELECT COUNT(*) FROM ArrowElec WHERE ((DATE>#3/31/03#)AND(DATE<#7/1/03#)"
I was able to get the SQL.REQUEST() function to work using a db on my local drive. however, all I get is #N/A in the target cell when using the file on the network server.
Does the Access database have to be opened exclusively by the computer running the SQL.REQUEST()? I'm wondering becuase the SQL.REQUEST() seems to work when it points at an Access database that is either closed or opened exclusively by me.
Would appreciate any comments or alternate methods to accomplish the above task.