query parameters

P

Patrick D.

Hi

I have a stored query in a accdb-database:

UPDATE Table SET Field1 = [?] WHERE [Field2]=[?];

Running the query I am just prompted for one parameter.
It must be only the second one.
Since I type in an existing value for Field2 and then Field1 is updated with
this value.
Typing in the first parameter at that place, which should be written into
the database I get the message: Are you sure, that you want to update 0
records? . . .no chance for the second parameter.
Why am I not prompted for both parameters?

Patrick
 
D

Dorian

Try giving them different names.
UPDATE Table SET Field1 = [Parm1] WHERE [Field2]=[Parm2];
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
P

Patrick D.

Hi Dorian

Thanks a lot, this is exactly the solution.

Patrick

Dorian said:
Try giving them different names.
UPDATE Table SET Field1 = [Parm1] WHERE [Field2]=[Parm2];
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".


Patrick D. said:
Hi

I have a stored query in a accdb-database:

UPDATE Table SET Field1 = [?] WHERE [Field2]=[?];

Running the query I am just prompted for one parameter.
It must be only the second one.
Since I type in an existing value for Field2 and then Field1 is updated with
this value.
Typing in the first parameter at that place, which should be written into
the database I get the message: Are you sure, that you want to update 0
records? . . .no chance for the second parameter.
Why am I not prompted for both parameters?

Patrick
 

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