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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bound Expressions Errors / Need Help Editing Controls in Forms

Status
Not open for further replies.

lauerj

Technical User
May 15, 2003
14
US
In my form, the user currently enters a number (% Change in Price) which a number of values elsewhere in the form are keyed off of (Reprint Cost, Total Cost, etc).

Is there a simple way where I can allow the user to instead change one of these values (e.g. Reprint Cost) and have it automaically update the % Change in Price field and flow the changes to other values as well (Total Cost, etc)??

I think there should be a simple solution or straightforward way to do this but I don't have a great understanding of forms am runnning into a problem with bound values...
 
You can only bind a field to one place, but you can use VBA code in the afterupdate event to update this data in multiple places. If it is in different tables, you will probably need to write SQL code to write an update query.
 
Sounds good, I still have a few ?'s:

- is there a way I can get the cells to update without binding them to an expression?

- how do I get form to display a default value? (I fill something in for the "default value" box in the cell's properties but nothing shows up...)

- any idea what the afterupdate code I need to write looks like?

 
OK, I was able to get my form to work and it looks good for the most part...The only problem that I am still having with is that I *cannot get default values to be populated* in any of the calculated fields (there are only about 10 of them right now). For some reason they refuse to show up even when I fill in the "Default Value" field using an expression. Is there another way to do this without writing a lot of code?

...this is driving me nuts
 
Buhler......Buhler......Buhler...
 
I am sorry that I haven't been paying attention to this thread for a while.

I think that default values will not work with calculated fields because there is always a value and not null. One thing that you may want to do is have your formula result in null and see if the default value shows in that case.

Another would be to have the formula solve to the default value.

Example: =iif(isnull(<expression>),<your default value>,<expression>)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top