If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
query parameters
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 |
#2
|
|||
|
|||
query parameters
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." wrote: 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 |
#3
|
|||
|
|||
query parameters
Hi Dorian
Thanks a lot, this is exactly the solution. Patrick "Dorian" wrote: 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." wrote: 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 |
Thread Tools | |
Display Modes | |
|
|