Input into either of two linked fields?

G

Guest

In my Quantities table and form I have fields for volume in both cubic feet
and cubic metres.
At present the form is set up so that users enter the volume in the cubic
feet field, and then tab through into the cubic metres field where it is
converted for them as they pass through.
However some people want to do it the other way round: enter cubic metres
and have it calculate the cubic feet for them.
I can't get this to work.
If I put a calculation (a simple division expression) into the feet field as
well as the metres field, I get Error in both fields and cannot enter
anything in either of them. That's not particularly useful.
I thought about having two alternative pairs of fields and people could use
either the feet first or the metres first, and whilst that would work, it
clutters up the form.
Is there any more elegant solution?
As usual, assistance will be very welcome!
Thanks
CW
 
G

Guest

I would not carry the quantity in two fields. This is redundant data is will
almost certainly get out of sync.

I would suggest you use one field for the quantity and the other to identify
the unit of measure type. I would put an option group with two toggle
buttons just before the quantity field. Make the caption of one CF and the
other CM and assign option values of 1 and 2 respectively. If the norm is to
use CF, make it the default value of the option group. So now, if they want
to use CM, they just have to click the CM button.

Carry the value in the uom in which it was entered. For reports, etc, you
will always know which measurement is being used.
To sweetent the pot, you could put logic in the After Update event of the
option group to convert the quantity to the selected uom for existing records.
 
G

Guest

I know what you mean about redundant data and getting out of synch,
but...unfortunately we do need to carry both uom. Some parts of the
transactions require cu feet and others need cu metres. In particular, I need
to be able to merge one or the other - and sometimes both, within the same
document - so I need to have each value/uom available as a distinct value.
And I can't get my head round where the system would look for each of them.
If a user inputs feet, we can collect that unit from there as a mergefield
and the metres from the calculated field.
But if he/she inputs metres, that's going to be in another field, and so is
the resulting feet value.
Clearly, the documents cannot look in all 4 fields.
Am I missing something really obvious? (Apart from a few extra much-needed
brain cells...)?
Many thanks
CW
 

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