If creating a query object in MS Access using a script, then the timeout can be specified by setting the QueryTimeout property on the database object coded like this:
DatabaseObject.QueryTimeout = integerseconds
There is sample code in the Microsoft Office documentation.
For queries that are coded as objects in MS Access, issue this DAO method:
CurrentDB.QueryDefs!thequeryobjectname.ODBCTimeout = integerseconds