Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: The purpose of these query

Geek News

The purpose of these query
Frank Situmorang 12/2/2008 11:03:02 AM
Hello,

Anyone canhelp me what is the purpose of this Query?, Is this just to list
all our tables and queries?

SELECT MsysObjects.Name AS [List Of Tables and Queries]
FROM MsysObjects
WHERE (((MsysObjects.Name) Not Like "~*" And (MsysObjects.Name) Not Like
"MSys*") AND ((MsysObjects.Type)=1 Or (MsysObjects.Type)=5))
ORDER BY MsysObjects.Name;


Thanks in advance
--
H. Frank Situmorang
Re: The purpose of these query
"Allen Browne" <AllenBrowne[ at ]SeeSig.Invalid> 12/2/2008 12:01:00 PM
Hi Frank

Access uses its own database engine to keep track of the objects in your
MDB, i.e. the tables, queries, forms, reports, etc. The names are stored in
a hidden system table named MSysObjects. You can see the table (but not
modify it) if you show hidden and system objects (Navigation Pane options in
A2007, or Tools | Options | View in previous versions.)

In MSysObjects, the Name field contains the name of the object, and the Type
field defines its type, e.g.:
1 = table
4 = ODBC linked table
6 = linked table
5 = query
-32758 = form
-32764 = report
- 32761 = module

Deleted objects (to be removed next compact), and hidden queries (for the
RecordSource of a form or the RowSource of a combo/listbox) start with "~".
The Microsoft system object names start with MSys.

Therefore, your query lists the names of the local tables and the queries in
the current database, excluding hidden and system objects, sorted by name.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Frank Situmorang" <hfsitumo2001[ at ]yahoo.com> wrote in message
news:8B6D3F6C-94D5-47EB-BEB1-5BFA303273F6[ at ]microsoft.com...
[Quoted Text]
> Hello,
>
> Anyone canhelp me what is the purpose of this Query?, Is this just to list
> all our tables and queries?
>
> SELECT MsysObjects.Name AS [List Of Tables and Queries]
> FROM MsysObjects
> WHERE (((MsysObjects.Name) Not Like "~*" And (MsysObjects.Name) Not Like
> "MSys*") AND ((MsysObjects.Type)=1 Or (MsysObjects.Type)=5))
> ORDER BY MsysObjects.Name;
>
>
> Thanks in advance
> --
> H. Frank Situmorang

Re: The purpose of these query
Frank Situmorang 12/2/2008 1:46:10 PM
Thanks Allen your explanation is great.

--
H. Frank Situmorang


"Allen Browne" wrote:

[Quoted Text]
> Hi Frank
>
> Access uses its own database engine to keep track of the objects in your
> MDB, i.e. the tables, queries, forms, reports, etc. The names are stored in
> a hidden system table named MSysObjects. You can see the table (but not
> modify it) if you show hidden and system objects (Navigation Pane options in
> A2007, or Tools | Options | View in previous versions.)
>
> In MSysObjects, the Name field contains the name of the object, and the Type
> field defines its type, e.g.:
> 1 = table
> 4 = ODBC linked table
> 6 = linked table
> 5 = query
> -32758 = form
> -32764 = report
> - 32761 = module
>
> Deleted objects (to be removed next compact), and hidden queries (for the
> RecordSource of a form or the RowSource of a combo/listbox) start with "~".
> The Microsoft system object names start with MSys.
>
> Therefore, your query lists the names of the local tables and the queries in
> the current database, excluding hidden and system objects, sorted by name.
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "Frank Situmorang" <hfsitumo2001[ at ]yahoo.com> wrote in message
> news:8B6D3F6C-94D5-47EB-BEB1-5BFA303273F6[ at ]microsoft.com...
> > Hello,
> >
> > Anyone canhelp me what is the purpose of this Query?, Is this just to list
> > all our tables and queries?
> >
> > SELECT MsysObjects.Name AS [List Of Tables and Queries]
> > FROM MsysObjects
> > WHERE (((MsysObjects.Name) Not Like "~*" And (MsysObjects.Name) Not Like
> > "MSys*") AND ((MsysObjects.Type)=1 Or (MsysObjects.Type)=5))
> > ORDER BY MsysObjects.Name;
> >
> >
> > Thanks in advance
> > --
> > H. Frank Situmorang
>
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net