If your web server supports ASP, you could create and execute a VB script
to create your query. It would use code like this ...
Dim objAccess
Dim strPathToMDB
Dim strFilePath
Dim strModuleName
Dim mdl
Dim strCode
Dim objScript
Dim objFile
Const acModule = 5
' ///////////// NOTE: User must edit variables in this section /////////////////
'
' The following 3 lines of code are the only variables that need be edited
' Provide paths to the Access MDB, Text file for import and the new table name.
'
strPathToMDB = "C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb"
strFilePath = "C:\ModuleCode.txt"
strModuleName = "Startup"
'
' ///////////////////////////////////////////////////////////////////////////////
' Create Access 97 Application Object
'Set objAccess = CreateObject("Access.Application.8")
' For Access 2000, use Application.9
Set objAccess = CreateObject("Access.Application.9")
' Open the desired database
objAccess.OpenCurrentDatabase(strPathToMDB)
Dim dbs, qdf
Set dbs = objAccess.DBEngine(0)(0)
Set qdf = dbs.CreateQueryDef("qryName", strSQL)
dbs.QueryDefs.Append qdf
' Clean up Access App Object
objAccess.CloseCurrentDatabase
ObjAccess.Quit
Set objAccess = Nothing