Jump to content

SQL UPDATE in ACCESS

- - - - -

  • Please log in to reply
No replies to this topic

#1
padsurfer07

padsurfer07

    Newbie

  • Members
  • Pip
  • 1 posts
Hi,

Please can you help.

I have the following statement which is returning a Runtime Error 3075. I am a new at this so apologies if it seems trivial.

I have two access tables on the same DB with an access form where a user can input a value i.e 1.14 in a text box.

The Tables are called AverageDemand and FutureDemand. When the user clicks a button, i want the code to take the value from Column AvgDemand multiply it by the textbox value and then add this new value to a column called ForDemand in table ForecastDemand. I need it to do this for all the partcodes (which is the unique identifier) between the two tables.

Here is my Code:

Db.Execute "UPDATE ForecastDemand SET ForDemand = AverageDemand.AvgDemand*txtForFact.text FROM AverageDemand WHERE AverageDemand.PartCode = ForecastDemand.PartCode;"




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users