IIF function in update Query

bclmx

New member
Local time
Today, 08:41
Joined
Jul 20, 2009
Messages
7
This is my first time here so please be patient. I am having some troubles with IIF function. Hope this is just a dummy question and there is a simple solution for it.
I am creating an update query where I want all the fields to be updated. That is not an issue here really what the problem is that I have one calculated field that needs to be updated according to values in other columns. So I am trying to tell access to update column A only if value in that column is null. ( I am not updating to rows in other table, I am updating to text. ie. Update to “A”)
Is there a way to tell access to "do nothing" for the false part in IIF function?
Here is an example: update column A if value is null. Do nothing if value in column A is not null.

IIF(
.[a] is null, do this, do nothing)


The true part of the function works ok only I need to tell access to omit the false part.

Hope this makes sense.
Any help would be greatly appreciated.

Andy
 
really what the problem is that I have one calculated field that needs to be updated according to values in other columns.
That is a big normalization no, no. You should not be storing calculated values, and beyond that you should not be storing values that are dependent upon other columns.
 
it would be IIF(isnull(
.[a]),True Part, false Part)

FYI...you shouldn't store calculated fields. Makes things a mess if you need to go and change any part of the calculation later on. You can use queries to calculate things later on if need be.
 
I think I did not express myself properly. But that's ok.
I've solved the issue in the mean time. Thank you for the effort.

Andy
 

Users who are viewing this thread

Back
Top Bottom