A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

query parameters



 
 
Thread Tools Display Modes
  #1  
Old December 2nd, 2009, 10:13 PM posted to microsoft.public.access.queries
Patrick D.
external usenet poster
 
Posts: 14
Default 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  
Old December 2nd, 2009, 10:25 PM posted to microsoft.public.access.queries
Dorian
external usenet poster
 
Posts: 542
Default 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  
Old December 3rd, 2009, 08:13 AM posted to microsoft.public.access.queries
Patrick D.
external usenet poster
 
Posts: 14
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:55 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.