Update pricelist colum with our table data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a table with a colum "percentage" withs i want to update.
I made a other table called "tbl_subs_percentage" where I put based on a
category's with "category" gets withs percentage, in de TBL_SUbs_percentage i
have 15 record (so 15 differend category's).
In the main table the Categroy is also knows, so I want to update the table
by looking in de other table and updates the record with the named category.
If I type the names it works, If i use the table names i get the question
"enter parameter value"

Here is my sql code...

UPDATE DB_Omzetting SET DB_Omzetting.Percentage =
[TBL_SUBS_Percentage]![Percentagenew]
WHERE (((DB_Omzetting.Percentage)=[TBL_SUBS_Percentage]![NaamSUB]));

Can some one tell me how to fix this?

Thanks in advanced.
 
What is the fieldname in the prompt? Is that value in the query? Is it in
the table?
 
In the prompt he asked for the Naamsub and the percentagenew
See table below..
As example... de MP3-players name is also in the DB_omzetting and the
Percentagenew is in the DB_omzetting table percentage... so he only has to
change all names with mp3-players to percentage 112 and offcourse the query
has to do the same with dvd-players enz..

NaamSUB Percentagenew
MP3-players 112
DVD-Players 110
Plasma TV's 101

[MVP] S.Clark said:
What is the fieldname in the prompt? Is that value in the query? Is it in
the table?

--
Steve Clark, Access MVP
http://www.fmsinc.com/consulting
*FREE* Access Tips: http://www.fmsinc.com/free/tips.html

Gert-Jan said:
Hi,

I have a table with a colum "percentage" withs i want to update.
I made a other table called "tbl_subs_percentage" where I put based on a
category's with "category" gets withs percentage, in de
TBL_SUbs_percentage i
have 15 record (so 15 differend category's).
In the main table the Categroy is also knows, so I want to update the
table
by looking in de other table and updates the record with the named
category.
If I type the names it works, If i use the table names i get the question
"enter parameter value"

Here is my sql code...

UPDATE DB_Omzetting SET DB_Omzetting.Percentage =
[TBL_SUBS_Percentage]![Percentagenew]
WHERE (((DB_Omzetting.Percentage)=[TBL_SUBS_Percentage]![NaamSUB]));

Can some one tell me how to fix this?

Thanks in advanced.
 
Access only prompts when it doesn't recognize a value. Did you add this
table to the query? Does there need to be a link between the two tables?

[TBL_SUBS_Percentage]![Percentagenew] is probably the wrong syntax as well.
Use a dot(.) instead of the !.



Gert-Jan said:
In the prompt he asked for the Naamsub and the percentagenew
See table below..
As example... de MP3-players name is also in the DB_omzetting and the
Percentagenew is in the DB_omzetting table percentage... so he only has to
change all names with mp3-players to percentage 112 and offcourse the
query
has to do the same with dvd-players enz..

NaamSUB Percentagenew
MP3-players 112
DVD-Players 110
Plasma TV's 101

[MVP] S.Clark said:
What is the fieldname in the prompt? Is that value in the query? Is it
in
the table?

--
Steve Clark, Access MVP
http://www.fmsinc.com/consulting
*FREE* Access Tips: http://www.fmsinc.com/free/tips.html

Gert-Jan said:
Hi,

I have a table with a colum "percentage" withs i want to update.
I made a other table called "tbl_subs_percentage" where I put based on
a
category's with "category" gets withs percentage, in de
TBL_SUbs_percentage i
have 15 record (so 15 differend category's).
In the main table the Categroy is also knows, so I want to update the
table
by looking in de other table and updates the record with the named
category.
If I type the names it works, If i use the table names i get the
question
"enter parameter value"

Here is my sql code...

UPDATE DB_Omzetting SET DB_Omzetting.Percentage =
[TBL_SUBS_Percentage]![Percentagenew]
WHERE (((DB_Omzetting.Percentage)=[TBL_SUBS_Percentage]![NaamSUB]));

Can some one tell me how to fix this?

Thanks in advanced.
 
Back
Top