Results 1 to 8 of 8
  1. #1
    Colleen2 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2022
    Posts
    26

    MS Access - Field Name Change


    I currently have a database with several tables, queries and reports that use the field "Invoice Period", that name has now changed to "Calendar Invoice Period", is there a way for me to update that change without going into each table, query and report?

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    Every form, query, report, expression in controls, will break, so no easy task. I would have to test to recall what happens in a query if the table field was aliased as it's something I haven't done for a long time. Maybe somebody else will see this sooner and chime in with that answer. If queries and recordsources use the field name and not the alias then you probably could get away with that.

    Can't you just leave the field name alone and change the labels on forms and reports to reflect the new name?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    Colleen2 is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2022
    Posts
    26
    That is an option to change the new name but the report includes the old field name too but it pulls a different parameters

  4. #4
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2019
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,407
    Access can help. First make sure autocorrect is turned on:
    Click image for larger version. 

Name:	autocorrect.png 
Views:	28 
Size:	32.7 KB 
ID:	49630

    Then in table design, change the name in the master table.
    Access will do a pretty good job of changing the name in form, reports and some queries.
    It won't change rowsource SQL strings for comboboxes or listboxes.
    It won't change SQL strings in VBA code.
    To quickly examine queries and SQL in forms, listboxes and comboboxes you will find this useful:

    Query Editor, Form Explorer, Rowsource editor (accessforums.net)

  5. #5
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    the report includes the old field name too
    So you added the field, not changed the old field name?
    If you changed the table field name, you have some work cut out for yourself.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,914
    Quote Originally Posted by Colleen2 View Post
    I currently have a database with several tables, queries and reports that use the field "Invoice Period", that name has now changed to "Calendar Invoice Period", is there a way for me to update that change without going into each table, query and report?
    What do you care what it is called?
    I would just change the caption for it in the table design?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    You can acquire a 3rd party add-in that can facilitate this. I used Rick Fisher's tool years ago but doesn't seem to be available anymore and had a cost (only $50). V-Tools is a freebie. https://www.skrol29.com/us/vtools.php

    If you want to change fields names, recommend you eliminate spaces.
    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.

  8. #8
    MikeKincaid is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    2
    Rick Fisher's tool can be found here: http://www.rickworld.com/download.html
    I have used V9 with Office 2016/2019 and O365 versions and it works. Plus worked with Rick for around 20 years. Great guy!

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

Similar Threads

  1. Replies: 4
    Last Post: 05-14-2018, 06:05 PM
  2. Replies: 2
    Last Post: 04-29-2014, 05:03 PM
  3. Replies: 1
    Last Post: 01-25-2014, 02:58 PM
  4. Replies: 1
    Last Post: 06-07-2013, 11:06 AM
  5. Replies: 5
    Last Post: 01-09-2012, 05:55 PM

Tags for this Thread

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