tags:

views:

22

answers:

1

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?

+4  A: 

How about:

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

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

Remou
@remou REMOU BLASTS through again
i am a girl