THIS IS NOT WORKING

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

Guest

I have a form that has a field "result". In this field I concatenate several strings and calculation results. I then want to store this on the "result" field in the table associated with this form. It will not write it in the table WHY???. What do I do NOW I need to use the field to merge it in a word document. and to store the results for future reference as part of a chart. I am very ignorant please be detailed with the help.
 
Hi,
You don't say how you are populating the result control
so I am going to assume you have this directly in the control's
Control Source. This means the control is unbound.
The easiset way around this is to create another unbound control
and populate that control the same way as your result text box.

Then, you bind your result textbox to the field you want to store the data in,
and try this code in the Current event of the form. I'm not sure if that is the right event
as I you don't say when or how you're doing the concatenation.

Me.result = Me.yourUnboundTextBox

Also, I must say that it's usually not a good idea to store calculated data.
First, you can always display the results to the user anytime by performing the calculation
when needed and second, if any of the field's values that you use change, then your
stored result is wrong!

--
HTH
Dan Artuso, Access MVP


MUSIWA said:
I have a form that has a field "result". In this field I concatenate several strings and calculation results. I then want to store
this on the "result" field in the table associated with this form. It will not write it in the table WHY???. What do I do NOW I need
to use the field to merge it in a word document. and to store the results for future reference as part of a chart. I am very
ignorant please be detailed with the help.
 
I have a form that has a field "result". In this field I concatenate several strings and calculation results. I then want to store this on the "result" field in the table associated with this form. It will not write it in the table WHY???. What do I do NOW I need to use the field to merge it in a word document. and to store the results for future reference as part of a chart. I am very ignorant please be detailed with the help.

You SHOULD NOT STORE this Result in a table. It's redundant and
unnecessary. A textbox on a Form (forms have Controls, not Fields; the
controls may or may not be bound to fields in your table) can either
be bound to a table field (storing its contents in the table) *or* it
can be set to an expression, not both.

You can base your Mail Merge from Word *on a Query* with your
concatenation expression in a vacant Field cell; you don't need to
store the concatenated expression in a Table.
 
Back
Top