can this be done?

roosn

Registered User.
Local time
Today, 23:17
Joined
Jul 29, 2005
Messages
121
i have a group of 4 pass thru queries, that i wish to run from various forms,

hence, can i construct some code containing the running of the queries, that i can reference from any form

this would allow me to change the combination of the queries without having to go to each form

help would be apprecated, many thanks
 
Could You Explain More What you Need ?
or
Attach A Sample Database
 
roosn,

You can make a public function:

Code:
Public Function RunMyQueries(strSequence As String) As Boolean

Select Case strSequence
   Case "All"
      DoCmd.OpenQuery "Query1"
      DoCmd.OpenQuery "Query2"
      DoCmd.OpenQuery "Query3"
      DoCmd.OpenQuery "Query4"
   Case "Query1"
      DoCmd.OpenQuery "Query1"
   Case Else
      RunMyQueries = False
      Exit Function
   End Select
RunMyQueries = True
End Function

Like wkalo said, it would help to know specifically what you are
trying to do.

Wayne
 

Users who are viewing this thread

Back
Top Bottom