Results 1 to 7 of 7
  1. #1
    rbtrout is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Posts
    15

    Zero fill

    I've been stuck with the task of learning Access and all the joys therein. I programmed back in the old FoxPro days and am familiar with SQL, but I could use some newbie help.



    I've got a database with about 15 fields and 30000+ records. Various queries brought in the data. Some of the fields that are numeric have nothing in them. I need to know how to fill all blank numeric fields with a zero.

    Thanks.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    An update query would be one way:

    UPDATE TableName
    SET FieldName = 0
    WHERE FieldName Is Null
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    rbtrout is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Posts
    15
    So simple that I missed it. Thanks for the info, problem solved.
    RB

  4. #4
    rbtrout is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Posts
    15
    That works, 1 column at a time. How about all the columns in the table that are null?

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Try

    UPDATE TableName
    SET FieldName1 = Nz(FieldName1, 0), FieldName2 = Nz(FieldName2, 0), ...
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    rbtrout is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Posts
    15
    Again, that worked. Thanks for the help. I forgot that I can do SQL commands, that will help me a lot.

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No problemo, and welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Auto-Fill names
    By jlclark4 in forum Forms
    Replies: 10
    Last Post: 12-13-2010, 03:04 PM
  2. Auto-Fill
    By sophiecormier in forum Programming
    Replies: 3
    Last Post: 10-02-2010, 08:29 AM
  3. Fill One text box from the other
    By adsm in forum Forms
    Replies: 4
    Last Post: 08-17-2010, 10:28 AM
  4. Auto Fill-In Capability?
    By bbarrene in forum Access
    Replies: 3
    Last Post: 01-15-2010, 08:35 AM
  5. Fill in Null values
    By Petefured in forum Queries
    Replies: 1
    Last Post: 10-06-2008, 12:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums