MS Project Query Error

D

dbonline

I am trying to build a select statement that extracts data from the Task
table in MS Project. The select by itself works fine, however when I try to
filter the data with a Where clause I get an error.

Statement:
rsSelect = "Select TaskUniqueId, TaskName, TaskSummary From Tasks Where
TaskSummary = " & chr(34) & "False" & chr(34) & "Order by TaskUniqueId"

When I run the statement I get the error:
Invalid column name "False"

Why does it think this string value "False" is a column? What is wrong with
this syntax? I just want to select rows that are not summary tasks.
 
R

Rod Gill

Hi,

This Group is meant to be closing, so please use the Developer group in
future.

To answer your question, I think you are using OLEDB? If so, try:
rsSelect = "Select TaskUniqueId, TaskName, TaskSummary From Tasks Where
TaskSummary = 0 Order by TaskUniqueId"

True is 1, False is 0

Note OLEDB is not supported in Project 2007

--

Rod Gill
Microsoft MVP for Project

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

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