?
Solved

Access Column

Posted on 2013-07-01
1
Medium Priority
?
377 Views
Last Modified: 2013-07-01
I want to find the first blank (null) value in a table column and replace it with 0 (zero) Any Thoughts --- Thanks
0
Comment
Question by:shieldsco
1 Comment
 
LVL 61

Accepted Solution

by:
mbizup earned 2000 total points
ID: 39291372
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.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question