can i make this query updatable

  • Thread starter Thread starter jonathan
  • Start date Start date
J

jonathan

I have this qeury, in MS SQL server this query is updatable. I move it into
access and it's not. Can i make this same query updatable in access.
From what i have read it's because i am using count, is there another way?
thx

SELECT (SELECT Count(tblgrouptasks.id)
FROM tblgrouptasks
WHERE tblgrouptasks.taskid = tasks.taskid) AS
rec_count, tasks.TaskID, tasks.Tasked_for, tasks.What_task,
tasks.next_contact, tasks.last_contact, tasks.priority_level,
tasks.task_completed, tasks.Task_due, tasks.task_notes, tasks.JobID
FROM tasks
WHERE tasks.task_completed)="no"
 
Not sure but try the DCount function like:

SELECT T.TaskID, T.Tasked_for, T.What_task, T.next_contact, T.last_contact,
T.priority_level, T.task_completed, T.Task_due, T.task_notes, T.JobID,
DCount("[id]", "tblgrouptasks", "[taskid] = " & T.taskid) AS rec_count

FROM tasks AS T
WHERE T.task_completed = 0

My guess is task_completed is a Boolean Field and you want to filter for
False (0).
"No" is a String which is not a valid value for a Boolean Field AFAIK.
 
Thank you, that worked a treat!!

Van T. Dinh said:
Not sure but try the DCount function like:

SELECT T.TaskID, T.Tasked_for, T.What_task, T.next_contact, T.last_contact,
T.priority_level, T.task_completed, T.Task_due, T.task_notes, T.JobID,
DCount("[id]", "tblgrouptasks", "[taskid] = " & T.taskid) AS rec_count

FROM tasks AS T
WHERE T.task_completed = 0

My guess is task_completed is a Boolean Field and you want to filter for
False (0).
"No" is a String which is not a valid value for a Boolean Field AFAIK.


--
HTH
Van T. Dinh
MVP (Access)



jonathan said:
I have this qeury, in MS SQL server this query is updatable. I move it into
access and it's not. Can i make this same query updatable in access.
From what i have read it's because i am using count, is there another way?
thx

SELECT (SELECT Count(tblgrouptasks.id)
FROM tblgrouptasks
WHERE tblgrouptasks.taskid = tasks.taskid) AS
rec_count, tasks.TaskID, tasks.Tasked_for, tasks.What_task,
tasks.next_contact, tasks.last_contact, tasks.priority_level,
tasks.task_completed, tasks.Task_due, tasks.task_notes, tasks.JobID
FROM tasks
WHERE tasks.task_completed)="no"
 
Back
Top