equation in form won't equal

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a button, that upon pushing is supposed to fill other fields in from
the subform....
1. It worked at one point- and now it won't!
2. is there a better way to do this?

Forms!frm_request!Casefreight =
Forms!frm_request!Frm_Request_Items!sumcasefreight
When I break the code the Casefreight =0 and the sumcasefreight = 42.77.

What is going on?
 
Tammy F said:
I have a button, that upon pushing is supposed to fill other fields in from
the subform....
1. It worked at one point- and now it won't!
2. is there a better way to do this?

Forms!frm_request!Casefreight =
Forms!frm_request!Frm_Request_Items!sumcasefreight
When I break the code the Casefreight =0 and the sumcasefreight = 42.77.

What is going on?


Not sure about your main problem but when you break the code on the above
statement it breaks before the statement is executed so it is normal
that the two values are not equal. Try breaking on the statement after the
above statement and the two values should be equal.



--
 
Tammy,
Try... (the formula must be all on one line, and assuming all your
objects are correctly named in the arguments)

Forms!frm_request!Casefreight =
Forms!frm_request!Frm_Request_Items.Form!sumcasefreight

Also, since CaseFrieght is a calculated field, it might be easier just to
place an unbound Text control on your main form with a ControlSource of...

= Forms!frm_request!Casefreight =
Forms!frm_request!Frm_Request_Items.Form!sumcasefreight

Given that you refresh the subform when the sumcasefreight should change,
CaseFreight should always display the correct amount.

hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
 
I did break it a few lines down. I am now looking up the correct value in a
query using dlookup- though I read somewhere to stay away from dlookups...
 
Back
Top