Results 1 to 4 of 4
  1. #1
    Mearntain is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Jul 2015
    Posts
    52

    Changing table properties with VBA


    Ive got 4 tables with on field name MO_ID that is formatted as a number. I then have a make table/append query that takes these 4 tables and puts them all into one table. At this step, I need to convert the field MO_ID to being a text field so that I can use an update query to change some special scan codes into word equivalents. For example, 100066 is getting updated to "Admin".

    The simple solution would seem to be to change the the original 4 table fields to a text, but that wont work in this case. I have several other queries that need to have relational properties with other tables that comparing numbers to numbers so that wont work.

    Is there a way to make that field change to a text field? But only when I run a certain query and only in that one table? Thanks and hopefully I made this clear .

  2. #2
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    I don't know the answer to what you ask, But it doesn't seem like a good solution.

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I am sure you could make design changes to the table via DAO and the TableDefs collection. However, I would reconsider the overall design. I like to think outside the box for solutions. Sometimes, when you find yourself spending a lot of time looking for an additional solution, you went down the wrong path when you first deviated from conventional approaches.

  4. #4
    Mearntain is offline Advanced Beginner
    Windows 7 64bit Access 2003
    Join Date
    Jul 2015
    Posts
    52
    I solved my issue by replacing the make table query with a delete query. I created the table with the desired field types ( rather than using a query to make the table), and just made a query to delete all the results in the table, and then fill them back in using an append query. Thanks to you two.

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

Similar Threads

  1. Permanently changing properties on a form in Access
    By Carroll in forum Programming
    Replies: 3
    Last Post: 02-07-2014, 02:07 PM
  2. VBA changing a few control properties
    By snipe in forum Forms
    Replies: 23
    Last Post: 12-31-2013, 03:17 PM
  3. Replies: 6
    Last Post: 12-03-2013, 02:59 AM
  4. Replies: 1
    Last Post: 04-12-2013, 07:56 AM
  5. Query Table Properties
    By Paul H in forum Access
    Replies: 8
    Last Post: 03-21-2012, 11:42 AM

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