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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Combining Data 1
Compare cells in different worksheets 3
row comparison 5
Script to ping a server. 0
Lookup with loop 3
Access query 5
Need Help 1
Excel Issue 1

Back
Top