W WSC Registered User. Local time Today, 01:33 Joined Nov 16, 2006 Messages 19 Nov 16, 2006 #1 I would like to call a query that is stored in my database from inside a module that runs on database start up. Can someone please give me the syntax?
I would like to call a query that is stored in my database from inside a module that runs on database start up. Can someone please give me the syntax?
boblarson Smeghead Local time Yesterday, 22:33 Joined Jan 12, 2001 Messages 32,059 Nov 16, 2006 #2 Code: DoCmd.OpenQuery "YourQueryNameHere" You can also tell it whether it is read only (look up OpenQuery in the help file for more info on the syntax)
Code: DoCmd.OpenQuery "YourQueryNameHere" You can also tell it whether it is read only (look up OpenQuery in the help file for more info on the syntax)
S SamDeMan Registered User. Local time Today, 01:33 Joined Aug 22, 2005 Messages 182 Nov 16, 2006 #3 depends what type of query and the purpose is. i can think of a few scenrios. you can use a QueryDef to run a query or a docmd.runsql to run some sql. sam
depends what type of query and the purpose is. i can think of a few scenrios. you can use a QueryDef to run a query or a docmd.runsql to run some sql. sam
boblarson Smeghead Local time Yesterday, 22:33 Joined Jan 12, 2001 Messages 32,059 Nov 16, 2006 #4 Good point Sam - But, since they had mentioned that it was a query that is stored in my database Click to expand... I assumed that they were talking about a pre-built query that is saved under the queries.
Good point Sam - But, since they had mentioned that it was a query that is stored in my database Click to expand... I assumed that they were talking about a pre-built query that is saved under the queries.