Calculated textbox to table (1 Viewer)

Dscalf1

Registered User.
Local time
Yesterday, 19:33
Joined
Jul 17, 2015
Messages
33
I guess I am confusing everyone when I say calculated data... The only reason this is calculated is because I am using an IIf statement in the control source to spit out a number a different button is pressed...

So therefore instead of being able to bind the textbox to the form that IIf statement is in the control source box..

So while no actual calculations are done there is a formula in there..

And that is also why I can not create a query to just pull the calculated data because it is based on the buttons..
 

vbaInet

AWF VIP
Local time
Today, 03:33
Joined
Jan 22, 2010
Messages
26,374
If it's another table that you want to update, create an Update Query that references the calculated value and use RunSql or Currentdb.Execute to fire the query.

Everyone else makes a good point about not saving calculated values though, but sometimes needs must.
 

vbaInet

AWF VIP
Local time
Today, 03:33
Joined
Jan 22, 2010
Messages
26,374
My post came a bit late because I'm logged in from my phone.
 

Dscalf1

Registered User.
Local time
Yesterday, 19:33
Joined
Jul 17, 2015
Messages
33
I know youre not supposed to save calculated values i have read it everywhere... If anyone else could give a proper solution instead of saving it im all ears.
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 03:33
Joined
Jul 9, 2003
Messages
16,274
No the form is bound to my results table and I do not want the user to enter the deductions that means they could enter less deductions than necesary.. Thats why it is important that the deductions is based on which button they push because the text box that shows the deductions will be locked and not editable..

You say that you don't want to allow the users to enter the deductions however doesn't pressing the option selection mean they have selected a deduction?
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 03:33
Joined
Jul 9, 2003
Messages
16,274
Is there any reason you need the value copied to a new table?

Why can't you have an extra field in your results table, (the table the form is bound to) to store the value? Please explain your thinking.
 

Dscalf1

Registered User.
Local time
Yesterday, 19:33
Joined
Jul 17, 2015
Messages
33
Theres no need for it to be copied to a new table the same table would be fine thats how it all has to end up anyway.

I appreciate everyones help Im just going to tell my boss it can not be done and use excel. thanks anyway
 

Dscalf1

Registered User.
Local time
Yesterday, 19:33
Joined
Jul 17, 2015
Messages
33
Is there any reason you need the value copied to a new table?

Why can't you have an extra field in your results table, (the table the form is bound to) to store the value? Please explain your thinking.

I thought about what you said. I changed it to where the user can input the deduction but I put a validation rule on it to where they can only enter the numbers I want.

Thank you for all of your help!
 

Users who are viewing this thread

Top Bottom