English to Metric Update Query

S

sonofroy

Hi I have a table with this in it.

Feet Meters
1 456.324
2 102.456
3 233.167
4 678.090

I would like to create an update query that will automatically fill the
empty cells by using the conversion factor from feet to meters and vice
versa. Can someone lead me into the right direction here?

Thanks
 
K

KARL DEWEY

Back up your table first.
Query ----
Field Feet Meters
Update To [Meters]*Factor [Feet]*Factor
Criteria Is Null Is Null

Next time only store one and use factor in a query when you need the results
differently.
 
J

John Spencer (MVP)

One small quibble, make sure the IS Null criteria is on two separate lines.
Otherwise you won't change anything since the only records being chosen would be
those where BOTH Feet and Meters were blank.

KARL said:
Back up your table first.
Query ----
Field Feet Meters
Update To [Meters]*Factor [Feet]*Factor
Criteria Is Null Is Null

Next time only store one and use factor in a query when you need the results
differently.

sonofroy said:
Hi I have a table with this in it.

Feet Meters
1 456.324
2 102.456
3 233.167
4 678.090

I would like to create an update query that will automatically fill the
empty cells by using the conversion factor from feet to meters and vice
versa. Can someone lead me into the right direction here?

Thanks
 
G

Gary Walter

Even *smaller* quibble, I would think
you would want to use IIF in update:

Field Feet
Update To IIF([Feet] IS NOT NULL, [Feet], [Meters]*Factor)
Criteria Is Null

Field Meters
Update To IIF([Meters] IS NOT NULL, [Meters], [Feet]*Factor)
Criteria
Or Is Null

John Spencer (MVP) said:
One small quibble, make sure the IS Null criteria is on two separate
lines.
Otherwise you won't change anything since the only records being chosen
would be
those where BOTH Feet and Meters were blank.

KARL said:
Back up your table first.
Query ----
Field Feet Meters
Update To [Meters]*Factor [Feet]*Factor
Criteria Is Null Is Null

Next time only store one and use factor in a query when you need the
results
differently.

sonofroy said:
Hi I have a table with this in it.

Feet Meters
1 456.324
2 102.456
3 233.167
4 678.090

I would like to create an update query that will automatically fill the
empty cells by using the conversion factor from feet to meters and vice
versa. Can someone lead me into the right direction here?

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