Setting values in fields from other fields

J

JC

Hi,

I want to concatenate several text fields together and
then assign the finshed value into another field.

I can create an expression to display what I want on a
form, but how do I then put this information into a field?

Thanks

JC.
 
H

Howard Brody

You can do it with an UpdateQuery but unless the other
fields are going to change, there's no need. You can re-
concantonate in a query or report so why spend the system
resources to save a redundant field?

Howard Brody
 
J

John Vinson

Hi,

I want to concatenate several text fields together and
then assign the finshed value into another field.

I can create an expression to display what I want on a
form, but how do I then put this information into a field?

Well... DON'T.

Storing derived data such as this in your table accomplishes
three things: it wastes disk space; it wastes time (almost
any calculation will be MUCH faster than a disk fetch); and
most importantly, it risks data corruption. If one of the
underlying fields is subsequently edited, you will have data
in your table WHICH IS WRONG, and no automatic way to detect
that fact.

Just redo the calculation whenever you need it, either as a
calculated field in a Query or just as you're now doing it -
in the control source of a Form or a Report textbox.

If you're assuming that you need to concatenate these fields in order
to create a unique Primary Key, you should be aware that a Primary Key
can consist of up to TEN fields. Just ctrl-mouseclick the fields and
click the Key icon.
 

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