msysobject.type

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

Hi,

I need your help how to add more "BBB", "CCC", "DDD", "EEE", "FFF", "GGG",
"HHH" after "AAA". I try to figure it out but it won't work. Your
feedback would be much helpful

"SELECT DISTINCTROW msysobjects.Name, msysobjects.Type, * FROM msysobjects
WHERE ((msysobjects.Type)=-32764 (Left([name],3)=" & "'" & "AAA" & "'" &
"")"

Thanks
 
Possibly:

"SELECT DISTINCTROW * FROM msysobjects WHERE msysobjects.Type=-32764 AND
Left([name],3) IN ('AAA','BBB','CCC','DDD','EEE','FFF','GGG','HHH')"
 
Bill,

If all you want is to search for reports whose names start with "AAA",
"BBB", "CCC", etc, then this will do it:

"SELECT [Name] FROM MSysObjects " & _
"WHERE [Type]=-32764 " & _
"AND (Left([Name], 3) = 'AAA' " & _
"OR Left([Name], 3) = 'BBB' " & _
"OR Left([Name], 3) = 'CCC' " & _
"OR Left([Name], 3) = 'DDD' " & _
"OR Left([Name], 3) = 'EEE' " & _
"OR Left([Name], 3) = 'FFF' " & _
"OR Left([Name], 3) = 'GGG' " & _
"OR Left([Name], 3) = 'HHH')"

I would, however, recommend that you rename these reports, using some common
method of grouping them, so your query isn't so unwieldly. For example:
"SELECT [Name] FROM MSysObject " & _
"WHERE [Type] = -32764 " & _
"AND Left([Name], 3) = 'ABC'"

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Microsoft Access 2003 VBA Programmer's Reference
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html
 
Back
Top