SQL Question

access: how to detect with VBA whether a query is opened?

is it possible to detect whether there is an open query using VBA in access-2007?

i am opening a query like this:

stDocName = "Meeting_Reasons_Frequency"
DoCmd.OpenQuery stDocName


is it possible to detect whether it is open?

Answer Source

How about:

 If SysCmd(acSysCmdGetObjectState, acQuery, "QueryName") = acObjStateOpen Then

More info: http://msdn.microsoft.com/en-us/library/aa205281(office.10).aspx

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download