Combining fields into one

B

Bernd

Hi all,

I'm busy with an assett database to record all IT eqioment. I now have the
following problem..

I have aa field called "speed" in which I type the speen of the CPU ie
"2.4GHz"
I'm a bit too lazy to type it 120 times so I created a table for it and
think I have gone too difficult for myself.

I wound up creating teo tables, one for the speed (called speed with speedid
and speed and clockid) and another called clock (with clockid and clock)

In speed I would only type the number and then have a drop down that looks
up if it is KHz, MHz or GHZ from the clock table - this works fine so far.

How can I now combine all the info into a single field so I can use it in
other forms as "one" field showing me my initial "2.4GHz"

Stuck on this. I either only get the 2.4, or the ID.

Help :)
 
O

Ofer Cohen

In the form RecordSource you need to combine both tables

SELECT speed.*, clock.clock, speed.speed & clock.clock As CombinedField
FROM speed INNER JOIN clock ON speed.clockid = clock.clockid

In that RecordSource there is another field, CombinedField, that combine
both fields, you can use it in the form for display only
 
F

fredg

Hi all,

I'm busy with an assett database to record all IT eqioment. I now have the
following problem..

I have aa field called "speed" in which I type the speen of the CPU ie
"2.4GHz"
I'm a bit too lazy to type it 120 times so I created a table for it and
think I have gone too difficult for myself.

I wound up creating teo tables, one for the speed (called speed with speedid
and speed and clockid) and another called clock (with clockid and clock)

In speed I would only type the number and then have a drop down that looks
up if it is KHz, MHz or GHZ from the clock table - this works fine so far.

How can I now combine all the info into a single field so I can use it in
other forms as "one" field showing me my initial "2.4GHz"

Stuck on this. I either only get the 2.4, or the ID.

Help :)

You don't combine it into a field.
Keep the data in two separate fields.
When ever you need to combine the data, in a report or in a form,
concatenate it, using an unbound text control:
=[Speed] & [Clock]

in a query you would use:
NewColumn:[Speed] & [Clock]

In either event, there is no need to save the combined value.
 
Top