Solved

Access Column

Posted on 2013-07-01
1
327 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 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
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…

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now