Setting field values from expressions

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
 
P

PC Datasheet

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.
 
K

Ken Smith

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top