I am trying to automate production of an Access report via ASP.

I have almost got there apart from the fact that I want to send either an
SQL statment or a value into the SQL within the report:

My code is:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim objAccess
Set objAccess = Server.CreateObject("Access.Application")

objAccess.OpenCurrentDatabase server.MapPath("data.mdb")
objAccess.DoCmd.OutputTo 3, "companycontacts", "Snapshot Format (*.snp)",
"C:\Inetpub\wwwroot\Access_Reports\companycontacts .snp"
objAccess.DoCmd.Quit 2
set objAccess = nothing

response.redirect "index.asp"
%>


The SQL within the report at the moment is:

Select * from companycontacts

However what I would like is to be able to send values like:

where companyname = 'Abacus Lighting Ltd' or companyname = 'Lighting Ltd' or
companyname = 'CSM Ltd'..................

etc, etc, etc

Has anyone come across a way of doing this ???

thanks for any replies

James Campbell