Hi,

Can anybody tell what is the correct syntax for a query in msacess when using the If statement. I want to convert the following statement to a query.


If Rs![Delivered] < rs![NewDelivery] Then
rs![Delivered] =NewDelivery
End If

There is a table that contains the Delivered field. I want to check to see if the Delivered field is less then the NewDelivery if so replace the Delivered date with the NewDelivery.

I have type the following on the query, but I get a syntax error.

= If [Delivered] < NewDelivery Then[Delivered] = NewDelivery
End If

I have look in to the Iff statement but is not what I want to want to replace, it seems that the Iff statement returns true of false it does not let me replace the value on the table.