PDA

View Full Version : Access Queries


Yamie
Feb 22, 2007, 06:44 AM
Am new and very happy to be in this forum.

I have an access database which comprises of many tables. My problem is I am tryng to develop a query possibly in design view which needs to use this condition

if storagedays>7 then storagedays=storagedays-7. unfortunately I haven't done it before.. am used to simple conditions

Ur help will be of influential importance

CLARIFICATION

Thanks here is my clarification.

The query has a number of field which will be retrieving data according to other defined conditions but with the conditions, it has to check a calculated field value [storagedays] which has to at the same check if the calculated field value is > 7 if so then deduct 7 from the storagedays .

Please if still unclear give your email address so that I can send you the screen shots

ScottGem
Feb 22, 2007, 06:51 AM
First, Welcome

I'm not clear what you need to do here. Are you trying to update a value in a table, display a calculation or what?

If you are trying to display a calc then add a column with the expression:

AdjStorageDays: IIF([Storagedays]>7,[Storagedays]-7,[Storagedays])

If you are looking to update the Storage days value, then create an Update Query in Design mode. In the Update To row enter:

[Storagedays]-7

In the Criteria Row enter:

>7