By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,968 Members | 1,180 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,968 IT Pros & Developers. It's quick & easy.

This is simple in excel....not in access....

P: 1
I am working in access on a program which requires me to multiply all the values in a field by each other. This is easy to replicate in excel, but I can't figure out how to do this in access.

Here is how I would do it in excel to show u what I mean using columns A and B, the equation is simply B2=A2, then B3=B2*A3, B4=B3*A4, and copying this sequence down the column. It's really simple, but what do i do in Access to achieve the same result?

A B
Account multiplier Account total
1.01 1.01
1.0109 1.021009
1.0003 1.021315303
1.0024 1.023766459
0.9961 1.01977377
0.995 1.014674901
0.995 1.009601527
0.995 1.004553519
1.01 1.014599054
1.0098 1.024542125
1.0098 1.034582638
1.0098 1.044721548
1.0098 1.054959819
1.0098 1.065298425
1.01 1.075951409
1.0056 1.081976737
0.9949 1.076458656
0.995 1.071076363
1.0309 1.104172622
0.996 1.099755932
0.9975 1.097006542
1.01 1.107976607
1.0233 1.133792462
0.99912 1.132794725
1.0022 1.135286873
0.9965 1.131313369
1.02 1.153939637
1.005 1.159709335
1.0075 1.168407155
0.9956 1.163266163
1.01 1.174898825
0.9975 1.171961578
Feb 23 '06 #1
Share this Question
Share on Google+
1 Reply


PEB
Expert 100+
P: 1,418
PEB
I am working in access on a program which requires me to multiply all the values in a field by each other. This is easy to replicate in excel, but I can't figure out how to do this in access.

Here is how I would do it in excel to show u what I mean using columns A and B, the equation is simply B2=A2, then B3=B2*A3, B4=B3*A4, and copying this sequence down the column. It's really simple, but what do i do in Access to achieve the same result?

A B
Account multiplier Account total
1.01 1.01
1.0109 1.021009
1.0003 1.021315303
1.0024 1.023766459
0.9961 1.01977377
0.995 1.014674901
0.995 1.009601527
0.995 1.004553519
1.01 1.014599054
1.0098 1.024542125
1.0098 1.034582638
1.0098 1.044721548
1.0098 1.054959819
1.0098 1.065298425
1.01 1.075951409
1.0056 1.081976737
0.9949 1.076458656
0.995 1.071076363
1.0309 1.104172622
0.996 1.099755932
0.9975 1.097006542
1.01 1.107976607
1.0233 1.133792462
0.99912 1.132794725
1.0022 1.135286873
0.9965 1.131313369
1.02 1.153939637
1.005 1.159709335
1.0075 1.168407155
0.9956 1.163266163
1.01 1.174898825
0.9975 1.171961578
Hi my frien,

For me the best is to declare a global variable in VB module! So You will save the last value of B in this variable and you can use it on the next record... :)

Also You need to do a function to set this variable and to read it from your query!

NB! When you do your query append the results in a table, because the values of the query will be recalculated and the result won't be good!

But when tha data is introduced in a table, it's calculated and there is no problem! :)

Have a nice luck!

:)
Sep 9 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.