Results 1 to 3 of 3
  1. #1
    TheHarleygirl2005 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    34

    Default Value Problem

    I have a field called "CompanyName". This field uses a value list created in the table with unique items I typed in myself. When I open the form, I would like the default value for that field to be the first item in the list. I added the following code to the default value box on the data tab in the form:

    =[CompanyName].[ItemData](0)




    Nothing happens, the field still shows blank when opening the form. Any idea what I'm doing wrong?

  2. #2
    TheHarleygirl2005 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    34
    Cancel this. It actually did work, it just didn't update my current entries. It will default to my first item on a new entry. Is there a way to update all my current listings other than manually? This is a new field so I have almost 300 entries that need to be updated.

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    An update query if you know the value:

    UPDATE TableName
    SET FieldName = 123
    WHERE FieldName Is Null
    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. dlookup as default value
    By ShostyFan in forum Forms
    Replies: 7
    Last Post: 01-28-2013, 01:18 AM
  2. Default Value
    By Njliven in forum Access
    Replies: 1
    Last Post: 10-10-2012, 12:48 PM
  3. saving default value to field problem
    By sk88 in forum Access
    Replies: 3
    Last Post: 01-08-2012, 01:15 AM
  4. Set default value
    By accessnewb in forum Programming
    Replies: 3
    Last Post: 08-17-2011, 06:24 PM
  5. Default value
    By Hatye in forum Access
    Replies: 1
    Last Post: 06-19-2011, 05:16 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