Update Query adds values twice

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

Guest

I am trying to create a query that will take a user entered number, add it to an existing number and update the field where the latter number is held. When the query is run, it takes the first number (user-entered) and adds it twice. Ex: 2+6=10. Following is the SQL.

UPDATE Performance INNER JOIN [Performance Reservation] ON Performance.[Performance Name]=[Performance Reservation].[Performance Name] SET Performance.[Number Currently in Attendance] = Forms![Performance Reservation]![Number Attending]+Performance![Number Currently in Attendance]
WHERE (((Performance![Performance Name])=Forms![Performance Reservation]![Performance Name]));

Thanks for any help you can offer!
 
Megan,

It is not immediately obvious why the calculation is not producing the
correct result. But I am not sure why you need to have the Performance
Reservation table/query in the query. Doesn't it work like this...
UPDATE Performance SET [Number Currently in Attendance] =
Forms![Performance Reservation]![Number Attending]+[Number Currently in
Attendance] WHERE Performance Name]=Forms![Performance
Reservation]![Performance Name]
 
Back
Top