English to Metric Update Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
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
 
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
 
Back
Top