Yes, you are correct. the And operator in VBA can be interpreted as logical
or bitwise, whereas it is logical only in JET.
JET 4 does have a BAND operator, but it works only if you execute your query
under ADO. Since the query interface uses DAO (the native Access library),
you can't use the BAND operator there, only in ADO code.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
In another thread, you said:
---------------------------------------
I have the following in a module that works:
Const DB_SYSTEMOBJECT = &H80000002
Public Function IsSystemObject(Flags)
IsSystemObject = (Flags And DB_SYSTEMOBJECT)
End Function
However when I use "Flags And 2147483650" in a query, I don't get the same
results as I do when I say "IsSystemObject(Flags)". Is a way to do the
equivalent of the IsSystemObject Function except in a query directly?
I guess the problem is that the And operator has dual purposes; it is either
a logical or a bitwise operator. So I can probably figure out a way to get
it to be a bitwise operator, but if someone does not mind enlightening me
with their experience, then that will problably help.
Note: Some people will recognize that this is testing the Flags field of the
MSysObjects table to determine if the object is a system
object.---------------------------------------"Sam Hobbs"
See the following for a
discussion I created about queries similar to what
you have provided.
http://groups.google.com/groups?q=g...lr=&[email protected]
Allen Browne said:
Very limited information is available through the AllForms collection
(Access 2000 and later), or the Documents collection (DA0).
Realistically, you need to open each form (hidden if you wish) to get at
the info.
To just get a list of the names of the forms:
SELECT [Name] FROM MsysObjects
WHERE (([Type] = -32768) AND ([Name] Not Like '~*'))
ORDER BY MsysObjects.Name;
message
I really thought I saw a sample in the Access documentation of accessing
controls in a form or report without the form or report being opened, but
now I sure can't find it. I probably misunderstood the sample and it just
is not possible to do it. If anyone knows of a sample such as this or
what Access object to use or anything like that then I am interested in
it. I don't need much information about how to do this, I can figure it
out if I know what to look at.