2 Table T1 is one to many T2 i need to update every row in T1 when I change the percent value

3 Table   ( T1 is one to many T2 )  and  ( T2 is one to many T3 )

I need to update every row in table T2  using  VBA  SQL statement  

open the attach File to see the problem

Thanks a lot

ramyoooooSystem AnalasysAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Fabrice LambertFabrice LambertCommented:
Please, disable all security and re-upload the file.
0
PatHartmanCommented:
We can't look at the data but I can tell you from your description that you have a design problem.  You are storing calculated data and you should not be.  It is far better to do the calculation in a query so that the data is always current and you don't have to run this type of update query.
0
ramyoooooSystem AnalasysAuthor Commented:
Here is the file again without  Shift+Enter

I know  that  It is better to do the calculation in a query ,But I need to make a form  that give the result In the same form

I do a lot of SQL statement before  but this one is complicated a little ,You have to make
Update statement with Select statement  while using Dsum statement
I hope I can find a good help

thanks a lot
N1.mdb
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Fabrice LambertFabrice LambertCommented:
I know  that  It is better to do the calculation in a query ,But I need to make a form  that give the result In the same form
This is the goal of sub forms.

In short:
Instead of basing your middle form on a table, base it on a query.

Unless performances are an issue (in you case, I doubt), a database should not hold calculated data.
0
ramyoooooSystem AnalasysAuthor Commented:
I did it and it work fine with me
but to fix the problem, I had to split my original update Vba Code into two statements. The first one is a make-table query and the other one is a cross-table update query.

Thank you All
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PatHartmanCommented:
You found the work around.  SQL doesn't support the action you originally attempted for a reason --- it violates second normal form.  Hopefully this won't cause your users a problem down the road.

Please accept your own answer and close the question.
0
ramyoooooSystem AnalasysAuthor Commented:
no form will violates ,I built this form for you so you can see all table in the same Time
but in real form it works individually fine
one of reason to do this Sql code
is to reduce the time while report query
and believe me it did a lot

Thanks a lot for all of you
0
ramyoooooSystem AnalasysAuthor Commented:
To fix this issue you have to work around, I split my original update Vba Code into two statements.
1 - The first one is a make-table query
2 - The other one is a cross-table update query.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.