Is this possible????

M

Mike Seder

I am wondering if there is any way to make a field's
value be a string from three other fields in the same
table. More specifically combining numerical values from
one 5 digit field (11111), one 3 digit field (222), and
one 4 digit field (3333) to produce a 12 digit numerical
field (111112223333) in the same table?
 
C

Cheryl Fischer

It is possible, just not recommended. Creating this sort field is frowned
upon as it is outside the rules of normalization. In addition, it creates
extra work because if either the 5-digit field, the 3-digit field or the
4-digit field is updated, some sort of code or update query will be needed
to update the field which combines them all.

You can always concatenate these fields for use in a query or a report as
follows:

cstr([5_DigitField]) & cstr([3_DigitField]) & cstr([4_DigitField])

And, if you must, the above expression can also be used in an update query.

hth,
 
G

Guest

I know that it may create issues on the update side of
things, but without going too far in depth this would be
helpful as the 12 digit field I mentioned is the field
which links my data from multiple tables. And automating
this would be easier than requiring users to key this
number in.

-----Original Message-----
It is possible, just not recommended. Creating this sort field is frowned
upon as it is outside the rules of normalization. In addition, it creates
extra work because if either the 5-digit field, the 3- digit field or the
4-digit field is updated, some sort of code or update query will be needed
to update the field which combines them all.

You can always concatenate these fields for use in a query or a report as
follows:

cstr([5_DigitField]) & cstr([3_DigitField]) & cstr ([4_DigitField])

And, if you must, the above expression can also be used in an update query.

hth,

--

Cheryl Fischer, MVP Microsoft Access
Law/Sys Associates, Houston, TX


Mike Seder said:
I am wondering if there is any way to make a field's
value be a string from three other fields in the same
table. More specifically combining numerical values from
one 5 digit field (11111), one 3 digit field (222), and
one 4 digit field (3333) to produce a 12 digit numerical
field (111112223333) in the same table?


.
 
V

Van T. Dinh

It is not necessary (and not recommended as Cheryl wrote)
to concatenate them to use the contenate String as the
link field. You can simply use the multi-field link, i.e.
linking 2 Tables using 2 or more Fields as Link Fields.

HTH
Van T. Dinh
MVP (Access)
 
G

Guest

Thank you very much sir, I had honestly overlooked that
option. Much easier and more reliable,,, thanks.
 

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