Setting field values from expressions

  • Thread starter Thread starter JC
  • Start date Start date
J

JC

Hello,

I am trying to put together a sales proposal database to
track issued proposal numbers. I have 4 fields which I
need to concatenate together. I have done this OK and am
now displaying the format I wish to have on a Form.

The question is how do I take this and store it into
another field in the table?

I am using the '&' to put my fields together.

Any help I would appreciate.

Thanks

JC
 
It is incorrect design to store the concatenated value. You should have 4 fields
in the table to store the components of the concatenated value. When you need
the concatenated value in a form or report then you should concatenate the 4
components.
 
Hi, JC. Happy New Year.

No doubt you will hear pureists say calculated values
should be stored in a database. To them I say "Nonsense!"

You will need to code an event for each variable input
field to store the calculation in your table using a
setvalue function.

Open you form in design mode, right click on any one of
the variable input fields, choose properties, event, and
right click on the 'onupdate' option. Choose 'macro.'

Enter the name of the field where you want to store the
calculation and the expression you want to store, which
might be the value of a field on your form.

You can find an example in Microsoft Knowledge Base
Article 209172.
 
Hi Ken, Happy New Year to you too.

I have followed you instructions and gone to the
knowledge base, however I get an error message when using
the SetValue action;

I have the following as seperate fields;

ProposalType - Year - No - Operator

I can show them on a form by concatenating them using
the '&' operator, this works fine.

I now want to write the completed proposal number back to
a proposals text field using the SetValue Action.

The Error Message;

'The object doesn't contain the automation object
ProposalDB, the component doesn't make the property or
method available for automation operations.'

Thanks

JC
 
Back
Top