Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

assign a value if a field is blank

Status
Not open for further replies.

monsterman66666

Programmer
Jan 17, 2002
8
0
0
US
i would like to assign a value if a field is blank.


thanks
 
Use an update query with IsNull on the criteria line for the field you wish to update. (By "blank" I assume you mean Null) Maq [americanflag]
<insert witty signature here>
 
Marquis,
Another option in query, form or report is NZ
Only works if field is truly null
syntax NZ([FieldName],(ValueThatYouWant))
ie: if the field is truly null Nz([FieldName],0)
will set field to 0
RGB
 
Marquis,
Sorry for the misdirect. I meant to send the response to MonsterMan. Hope no criticism was inferred.
RGB
 
No offense taken here. You're right, the NZ function is another solution. Just depends on what Monsterman is trying to accomplish.

Maq [americanflag]
<insert witty signature here>
 
Well I was here looking at this post, and I used the IsNull option that Maquis posted. There is a slight error that took me a few seconds to resolve:

Instead of putting IsNull in the criteria you need to put
Is Null. There needs to be a space between Is and Null.

Hey but thanks guys!
Sera
I often believe that...
My computer is possessed!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top