View Full Version : Queries and Modules


clauses
01-10-2002, 04:33 AM
I developed a make table querry used to build a report file. I open this query using a module that is activated or called using a macro from the switchboard. Every time I open the query it opens in debug mode and I or the user needs to press F5 fot it to run. Once F5 has been pressed it runs wihtout error but how can I keep it from opening in debug mode.

glynch
01-10-2002, 04:59 AM
How are you opening the query. In code you can create a querydef object based on your query and use a querydef.execute statement and it will run without interrupting the processing.

clauses
01-10-2002, 06:23 AM
could you give me an example of how to use this command I cant sem to find much information regarding its use

glynch
01-11-2002, 02:35 AM
Dim dbsABC as Database
Dim qdfXYZ as Querydef

Set dbsABC = CurrentDB
Set qdfXYZ = dbsABC.QueryDefs("your make-table query name")
qdfXYZ.Execute

glynch
01-11-2002, 02:38 AM
p.s. you can find more info by doing a search on querydef on the index tab of Access Help.

clauses
01-11-2002, 03:23 AM
Thank You very much

clauses
01-11-2002, 03:23 AM
Thank You very much

clauses
01-11-2002, 04:58 AM
When I tried to apply this method i received an undefined user type error on the statment

Dim dbs As Database