Query

  • Thread starter Thread starter Greg Jesky
  • Start date Start date
G

Greg Jesky

I am new.
I have built a small database with only 5 tables. On table has 2 fields of
interest.
I would like to multiply the vaue in field1 by( 1.10).
I would then like to subtract the value in field 2 from the value in field
1.
If the result is positive I would like to select the record.
If the result is negative I do not want to select the record.

Can this be done without VB?

Thanks,
Greg
 
I am new.
I have built a small database with only 5 tables. On table has 2 fields of
interest.
I would like to multiply the vaue in field1 by( 1.10).
I would then like to subtract the value in field 2 from the value in field
1.
If the result is positive I would like to select the record.
If the result is negative I do not want to select the record.

Can this be done without VB?

Easily.

Put a calculated field in the Query by typing

NewFieldName: [Field1] * 1.1 - [Field2]

This will be the value of the expression you provided. Put a criterion
of

on the Criteria line under this field.

Note that this query will not actually change the value stored in
Field1 - you'll need an Update query to do so.

John W. Vinson[MVP]
 
Use a calculated field

Field: ([Tablename].[Field1]*1.1) - [Tablename].[field2]
Criteria: >=0
 
Back
Top