+ Reply to Thread
Results 1 to 5 of 5

Open Access for viewing and change field name not working

  1. #1
    Registered User
    Join Date
    11-10-2020
    Location
    London
    MS-Off Ver
    365
    Posts
    11

    Open Access for viewing and change field name not working

    Hello,

    Sorry for question. I would like to open a table for viewing and change a fieldname, but the fieldname is not changed. How can I make this to work?

    /P

    Please Login or Register  to view this content.
    Last edited by alansidman; 11-18-2020 at 01:19 AM.

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Open Access for viewing and change field name not working

    you cannot change a field's name by using the tableDefs collection and reference the .fields() index without setting an object. I don't believe anyway. the best way to do this, which is a very common method used in every web-based database in the world, including SQL server, MYSQL, Oracle, MongoDB and others, called DDL (data definition language). However, you cannot change a field name with that technique very easily. at least not in one statement. thus, you should rename it using VBA code, modified from what you already have. try this:
    Please Login or Register  to view this content.
    if that doesn't work, you'll have to use DDL more than likely.

  3. #3
    Registered User
    Join Date
    11-10-2020
    Location
    London
    MS-Off Ver
    365
    Posts
    11

    Re: Open Access for viewing and change field name not working

    Thanks again! I got it to work. I created two different functions.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: Open Access for viewing and change field name not working

    Code Tags Added
    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Registered User
    Join Date
    11-11-2020
    Location
    Russia
    MS-Off Ver
    Osikerete
    Posts
    1

    -

    Hi,

    I dont have a DMD, I use 2 screens. But in this table with BAM I cannot see the display on the DMD1 and DMD2 that I can see in the editor.
    So im not able to see score, count of ball etc....

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to change the atribute of an access field
    By RamblingWreck in forum Access Tables & Databases
    Replies: 1
    Last Post: 12-21-2014, 03:51 AM
  2. access vba to change data type of a field in a table
    By ewong in forum Access Programming / VBA / Macros
    Replies: 0
    Last Post: 09-12-2012, 03:32 PM
  3. Replies: 0
    Last Post: 06-19-2012, 10:11 AM
  4. Replies: 9
    Last Post: 05-22-2012, 08:59 AM
  5. pictures viewing in access
    By Ranbir in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2010, 09:15 AM
  6. Access button to change date field
    By slym34 in forum Access Tables & Databases
    Replies: 1
    Last Post: 09-22-2010, 04:41 PM
  7. [SOLVED] Viewing Access Code in Windows 2000
    By Larry Bird in forum Excel General
    Replies: 1
    Last Post: 11-08-2005, 02:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1