[AccessD] SysCmd constant conflict

MartyConnelly martyconnelly at shaw.ca
Sun Aug 17 14:24:47 CDT 2003


Is it a binary combination?
a 5 indicates both

'acObjStateOpen  The object is open  1
'acObjStateNew   The object is new   4


Susan Harkins wrote:

>I'm using the SysCmd function to determine an object's state. Problem is,
>the integer values the function's returning, doesn't match the constants.
>
>The Object Browser and the Immediate window both use the following:
>
>'acObjStateOpen  The object is open  1
>'acObjStateNew   The object is new   4
>'acObjStateDirty A change has been made, but unsaved     2
>
>But I get 1, 5, an 3, respectively when I run the function (below). Also, 7
>turns up with a new form that's had default properties reset but not saved.
>I've checked the object browser, but I'm not getting much help -- everything
>refers to 1, 4, and 2.
>
>Anybody know more about 3, 5, and 7? I'm using Access XP but you'd think the
>browser would reflect changes to the constants if they'd been made from one
>version to another?
>
>Thanks!
>Susan H.
>
>Public Function ObjState(Optional objname As Variant, _
>    Optional objtype As Variant) As Variant
>  'determine whether the object is
>  'selected or passed via arguments
>  Dim intState As Integer
>  If IsMissing(objname) = True Then
>  'if using current object
>    ObjState = SysCmd(acSysCmdGetObjectState, _
>        Application.CurrentObjectType, _
>        Application.CurrentObjectName)
>  'if using passed argument
>  Else
>    ObjState = SysCmd(acSysCmdGetObjectState, _
>      objtype, objname)
>  End If
>End Function
>
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com
>
>  
>




More information about the AccessD mailing list