Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ignore first 4 characters in query result 1

Status
Not open for further replies.

johnfrani

Technical User
Oct 2, 2002
33
US
In Access 2007, I named my training reports like this..."(t) All Training" and I named my personnel reports like this..."(p) All Employees" so my SELECT query could easily select either training or personnel reports.
I use this query to populate a listbox of personnel reports...

SELECT [MsysObjects].[Name], [MsysObjects].[Name]
FROM MsysObjects
WHERE ((([MsysObjects].[Name]) Not Like "~*"
And ([MsysObjects].[Name]) Not Like "MSys*")
And (([MsysObjects].[Name]) Like "(p)*")
And (([MsysObjects].[Type])=-32764))
ORDER BY [MsysObjects].[Name];

My problem is that I don't want the first 4 characters of the report name, the "(p) ", to display in the listbox.

How do I only display the "All Employees" part of the report name without the "(p) "?

Thanks, John

 
Select Mid([MsysObjects].[Name],4) as CleanName....
 
Thanks for your quick and excellent response. It worked like a charm.
John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top