Need help with update sql plus filter

C

Clddleopard

I have the following update sql (copied from the query design view)
UPDATE ListQry SET ListQry.ApprovalStatusID =
[Forms]![OpeningForm]![Responsibility]
WHERE (((ListQry.ApprovalStatusID)<[Forms]![OpeningForm]![Responsibility]
And (ListQry.ApprovalStatusID)>-1) AND ((ListQry.OtherStatusID)>300)) OR
(((ListQry.ApprovalStatusID)<[Forms]![OpeningForm]![Responsibility] And
(ListQry.ApprovalStatusID)>-1) AND ((ListQry.OtherStatusID) Is Null));

ApprovalStatusID is an integer
OtherStatusID is an integer

ListQry is the recordsource for my form. I would like to add the filter on
the form to the Where statement. I can't get it to work. I think I'm having
issues with the spaces and quotation marks and all that. Could I get help?
 
S

S.Clark

The UPDATE statement is used to update data in the table, so I don't
understand your objective.
 
K

KARL DEWEY

I can't get it to work.
What is it not doing? What is it doing it should not do?
Post examples of --
ListQry.ApprovalStatusID
[Forms]![OpeningForm]![Responsibility]
ListQry.OtherStatusID
-- where you say it does not work.
What 'spaces and quotation marks'?

--
Build a little, test a little.


Clddleopard said:
I have the following update sql (copied from the query design view)
UPDATE ListQry SET ListQry.ApprovalStatusID =
[Forms]![OpeningForm]![Responsibility]
WHERE (((ListQry.ApprovalStatusID)<[Forms]![OpeningForm]![Responsibility]
And (ListQry.ApprovalStatusID)>-1) AND ((ListQry.OtherStatusID)>300)) OR
(((ListQry.ApprovalStatusID)<[Forms]![OpeningForm]![Responsibility] And
(ListQry.ApprovalStatusID)>-1) AND ((ListQry.OtherStatusID) Is Null));

ApprovalStatusID is an integer
OtherStatusID is an integer

ListQry is the recordsource for my form. I would like to add the filter on
the form to the Where statement. I can't get it to work. I think I'm having
issues with the spaces and quotation marks and all that. Could I get help?
 
D

De Jager

Clddleopard said:
I have the following update sql (copied from the query design view)
UPDATE ListQry SET ListQry.ApprovalStatusID =
[Forms]![OpeningForm]![Responsibility]
WHERE (((ListQry.ApprovalStatusID)<[Forms]![OpeningForm]![Responsibility]
And (ListQry.ApprovalStatusID)>-1) AND ((ListQry.OtherStatusID)>300)) OR
(((ListQry.ApprovalStatusID)<[Forms]![OpeningForm]![Responsibility] And
(ListQry.ApprovalStatusID)>-1) AND ((ListQry.OtherStatusID) Is Null));

ApprovalStatusID is an integer
OtherStatusID is an integer

ListQry is the recordsource for my form. I would like to add the filter on
the form to the Where statement. I can't get it to work. I think I'm
having
issues with the spaces and quotation marks and all that. Could I get help?
 

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