Call this member function to determine whether the CDaoQueryDef object is currently open.
BOOL IsOpen( ) const;
Nonzero if the CDaoQueryDef object is currently open; otherwise 0.
A querydef must be in an open state before you use it to call Execute or to create a CDaoRecordset object. To put a querydef into an open state call either Create (for a new querydef) or Open (for an existing querydef).