Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Nov 2002
    Location
    South Carolina, USA
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am trying to do some automation for a database.
    I current import a file from another system.
    My numeric fields come in as text.
    I normally just on the table design and change them manually.
    I am trying to automate this process because I am passing the database to someone else to use.
    Is there a macro function to change a field type or a query to change a field type and then make a table???

    Thanks,
    Deb

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts
    Yes it is possible to do what you describe - although it means you need use DAO to manipulate the TableDef object for the table in order to change it. The subject is a bit more than can be easily handled in the forum, but DAO Tabledef (MFC) is a place you could start. If you have some comfort level with VBA and DAO, you should be able to do what you want. If you want to see examples and code, the Access VBA Programming books from WROX have some examples with detailed descriptions. And you might find Allen Browne's tip on the subject useful.
    Wendell

  3. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts
    Quote Originally Posted by DeborahP View Post
    I am trying to do some automation for a database.
    I current import a file from another system.
    My numeric fields come in as text.
    I normally just on the table design and change them manually.
    I am trying to automate this process because I am passing the database to someone else to use.
    Is there a macro function to change a field type or a query to change a field type and then make a table???

    Thanks,
    Deb
    Why dont you import the table into the database like you do now.

    Then create an append query to append records from that table to another table (after having deleted all records from that table first) where those text fields have already been defined as numeric.

Posting Permissions

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