Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Override Calculated Field

Status
Not open for further replies.

SteveR77

Programmer
Sep 18, 2000
813
US
I know this goes against all things pure and holy when attempting to keep the data clean, but I have been given this database I did not create it.

The issue is this the user needs to override a tax percentage that is calculated. The tax field is read-only because it is calculated control. I know I can set up another field which would allow them to perform the data entry, BUT they want to have the new tax percentage that is entered be what is used in the other calculated controls on the form.

Based on what I know about Access I beginning to believe that this is just not going to be possible.

Thanks in advance.

Steve :-S
 
I feel sure you can do it. How is the tax rate calculated? I started out with nothing, and I still have most of it.
 
Simply change the read only field to allow entry and have it calculate on an event rather than as a bound control.

You can then overwrite.

Craig
 
Thanks for the replies folks but I am not sure I communicated this properly.

I did not set the control up to be read-only. This will happen automatically when you set a control source to be equal to a calculation.

Try this and you'll see what I mean.

1 - Create a form that has two text box controls

2 - Set the first control's ControlSource to = 9 * 9

3 - Open the form

4 - You will have the value of 81 in the first control but if you try to click or tab to the first control and change it's value it will not work. By definition calculated control's are read-only.

This now takes me back to the original issue, because you cannot set the value of a read only control. If you attempt to change the ControlSource so it is unbound and then perform a recalc on the form if it is a part of how other controls calculate their values you will get errors in those controls.

The problem sounds simple, but it goes against how a single control should work. A control should either be calculated, bound, or unbound in order to keep the data clean.

Once again. Thanks in advance for any ideas. S-)
 
Why can't you use a query as the form's record source?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top