• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 387
  • Last Modified:

Access Column

I want to find the first blank (null) value in a table column and replace it with 0 (zero) Any Thoughts --- Thanks
1 Solution
Assuming that your table is in a detectable order - such as with an auto number ID, you can use this UPDATE query:

UPDATE YourTable
SET YourField = 0
WHERE ID = DMin("ID", "YourTable", "YourField IS NULL")

Open in new window

Note that if you do not have an autonumber, date field or some other way to identify the order of the records, then it is impossible to reliably find the "First" Null in your table.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now