Results 1 to 9 of 9
  1. #1
    rockell333 is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Sep 2015
    Posts
    33

    Update a field with the active table name

    I want to place the table name formatted as a date in a field in that table. Meaning:



    Table name is 082615
    Field in Table File_Date
    All records in thta File_Date column should read 8/26/2015

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    do you mean create a table?
    run a make table query.
    or make the table in design mode.

  3. #3
    rockell333 is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Sep 2015
    Posts
    33
    no... I want to populate a field within a table with that table name NOTE: its a Date field

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Why do you have tables that have dates as names?

    Can run and UPDATE sql action.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    rockell333 is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Sep 2015
    Posts
    33
    what would the update say.. to set as the table name

  6. #6
    rockell333 is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Sep 2015
    Posts
    33
    The files are daily so they are named as such. 091815 and so on.. the field doesnt necessarily have to update as a date field but i need to identify the date in the table, as the table eventually gets renamed

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    rockell333,

    Step back and tell us in plain English what you are trying to do. No jargon--just simple English.
    Your posts are not making much sense in terms of well designed relational database.

  8. #8
    rockell333 is offline Advanced Beginner
    Windows 8 Access 2010 64bit
    Join Date
    Sep 2015
    Posts
    33
    i did earlier in the string. very simply i want to update a field with the table name

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    So you are creating a new table every day? This is bad design. Records should be imported to existing table.

    If the field is a text then the parameter needs apostrophe delimiters, if it is a date/time then # delimiters, number don't have delmiters.

    UPDATE tablename SET fieldname = 'SomeValueHere'

    UPDATE tablename SET fieldname = #SomeValueHere#

    UPDATE tablename SET fieldname = SomeValueHere

    How you get data into SomeValueHere can be done many ways.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 21
    Last Post: 01-21-2014, 05:04 PM
  2. Replies: 1
    Last Post: 01-11-2014, 12:39 PM
  3. Replies: 1
    Last Post: 05-17-2013, 12:53 PM
  4. Replies: 5
    Last Post: 11-01-2012, 09:26 AM
  5. Update field in table after update on a subform
    By jpkeller55 in forum Queries
    Replies: 3
    Last Post: 09-30-2010, 08:02 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