Solved

Access Column

Posted on 2013-07-01
1
342 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 61

Accepted Solution

by:
mbizup earned 500 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 a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
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.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

730 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