Changing a formula

  • Thread starter Thread starter LV
  • Start date Start date
L

LV

I have a query that contains approx. 1000 records. I need to update a
formula in the query for any new records that will be entered in the future.
Is there a way to change the formula for the new reocrds while maintaing the
formula/calculations that were used for the old records already in the query?

Thanks!
--
 
LV said:
I have a query that contains approx. 1000 records. I need to update a
formula in the query for any new records that will be entered in the future.
Is there a way to change the formula for the new reocrds while maintaing the
formula/calculations that were used for the old records already in the query?


If you have a date field that can be used to tell if a
record was entered before or after the change, then you
could use an expression like:

IIf([datefield] < #1/14/2008#, old formula, new formula)
 
Ok - just so I understand this right... if my old formula is X+Y and my new
formula is X+Z, I would have an expression (in the field with the formula)
that looks like this:

If([Date]<#1/1/08#, X+Y)

Do I need an expression for the new formula, or will it default to that if
the date criteria isn't met for the old formula?

--



Marshall Barton said:
LV said:
I have a query that contains approx. 1000 records. I need to update a
formula in the query for any new records that will be entered in the future.
Is there a way to change the formula for the new reocrds while maintaing the
formula/calculations that were used for the old records already in the query?


If you have a date field that can be used to tell if a
record was entered before or after the change, then you
could use an expression like:

IIf([datefield] < #1/14/2008#, old formula, new formula)
 
LV said:
Ok - just so I understand this right... if my old formula is X+Y and my new
formula is X+Z, I would have an expression (in the field with the formula)
that looks like this:

If([Date]<#1/1/08#, X+Y)


No, it wuld be:

IIf([Date]<#1/1/08#, X+Y, X+Z)

If you are using the word field to mean a text box control
(as opposed to a field in a query), then remember to preceed
the expression with an = sign.
 
Back
Top