vba - how can i get the values in this column to sort according tothe hierarchy?

A

andy.novak

I'm using this SQL statement to pull in hierarchical custom field
values:

rs.Open "Select MemberFullValue,MemberDescription FROM
MSPLT_Performer_UserView WHERE (MemberValue <> '')", Conn

But I can't use an ORDER BY on this data type (MemberFullValue)

How can I get these values sorted in a combo box as they normally
appear in the hierarchy in Project Server?

I'm very new to this, so specifics would be very welcome! :)

Andy Novak
UNT
 
R

Rod Gill

I think you need something like:

rs.Open "Select CAST(MemberFullValue as varchar(255)) AS MemberValue,
MemberDescription FROM MSPLT_Performer_UserView WHERE (MemberFullValue <>
'') ORDER BY MemberValue", Conn


--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 
A

andy.novak

I think you need something like:

 rs.Open "Select CAST(MemberFullValue as varchar(255)) AS MemberValue,
MemberDescription FROM  MSPLT_Performer_UserView WHERE (MemberFullValue<>
'') ORDER BY MemberValue", Conn

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:http://www.projectvbabook.com

Rod,
That worked beautifully - THANK YOU!

Now for a quick followup - is there any way to display that list in a
graphical fashion as its displayed in EPM in some cases? Any
particular function perhaps?

Thanks
Andy
 
R

Rod Gill

Not that I know of. I would export to Excel and graph there using
automation.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com



I think you need something like:

rs.Open "Select CAST(MemberFullValue as varchar(255)) AS MemberValue,
MemberDescription FROM MSPLT_Performer_UserView WHERE (MemberFullValue <>
'') ORDER BY MemberValue", Conn

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:http://www.projectvbabook.com

Rod,
That worked beautifully - THANK YOU!

Now for a quick followup - is there any way to display that list in a
graphical fashion as its displayed in EPM in some cases? Any
particular function perhaps?

Thanks
Andy
 

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

Top