Update Query criteria is not null

branston

Registered User.
Local time
Today, 10:18
Joined
Apr 29, 2009
Messages
372
Hi,

I have 2 tables in a query. They are not linked. Table 1 will only ever have 1 record, with 1 field in. If there is a value in table 1, I want a field in table 2 to be updated to the value in table 1. However, if table 1 is blank, I want a field in table 2 to be updated to something different.

Im thinking i need an iff statement in the criteria, but im not really sure - I havent had much to do with queries.

Any help would be greatly appreciated. Thank you!
 
You would be better using the Nz() function to do this.

David
 
This sounds like a query is not what you want...the problem could easily be fixed using a simple VBA function, using an if statement

i.e.

If Forms!Form_1!MyField <> Null Then
Forms!Form_2!MyOtherField = Forms!Form_1!MyField
End If
 

Users who are viewing this thread

Back
Top Bottom