VBA SQL won't run because of custom field name

A

andy.novak

I've got the following SQL statement that won't execute in a VBA
script because the custom field referenced by the view is "Service
Area", not "Service_Area" or "ServiceArea" (there is a space in
between)


rs2.Open "Select MemberValue FROM 'MSPLT_Service Area_UserView' ORDER
BY MemberValue", Conn

Anyway I can cod this to "excuse" the space or do I have to rename the
custom field to "Service_Area" or "ServiceArea"?

Thanks,
Andy Novak
UNT
 
A

andy.novak

Hi,

Does:
"Select MemberValue FROM [MSPLT_Service Area_UserView] ORDER BY
MemberValue", Conn

work?

--

Rod Gill
Microsoft MVP for Project

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


I've got the following SQL statement that won't execute in a VBA
script because the custom field referenced by the view is "Service
Area", not "Service_Area" or "ServiceArea" (there is a space in
between)
rs2.Open "Select MemberValue FROM 'MSPLT_Service Area_UserView' ORDER
BY MemberValue", Conn
Anyway I can cod this to "excuse" the space or do I have to rename the
custom field to "Service_Area" or "ServiceArea"?
Thanks,
Andy Novak
UNT

Thanks Rod. I haven't tried that - didn't know that was an option
 

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