Use this query to show the objects and set your desired object as a
parameter:
SELECT
IIf(Nz(Object.Type,0)=5,"Queries",IIf(Parent.Name="Scripts","Macros",Parent.Name))
AS ObjectType, Object.Name AS ObjectName,
Switch([ObjectType]="Tables",1,[ObjectType]="Queries",2,[ObjectType]="Forms",3,[ObjectType]="Reports",4,[ObjectType]="Macros",5,[ObjectType]="Modules",6,True,0)
AS SortOrder, CurrentDb.Name AS WhatDatabase
FROM MSysObjects AS Parent INNER JOIN MSysObjects AS [Object] ON
Parent.Id=Object.ParentId
WHERE (((Left$(Nz(Object.Name," "),1))<>"~") And ((Left$(Nz(Object.Name,"
"),4))<>"Msys") And ((Parent.Type)=3));
Bob Galway
(e-mail address removed)
Hello,
In a VBA collection I need to test if an item exists or not.
How to do this without having to loop accross all the collection ?
Thanks.
Pierre.