Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Mar 2004
    White Oak, Pennsylvania, USA
    Thanked 0 Times in 0 Posts

    Table Field Data Types (Access 2002 SP3)

    I need to be able to change the data types of fields in a table using VBA.
    For example, I have a field that is Numeric, Single and I need to change it to a Text field - length 11 after processing the data in the table.
    I can do it in table design but was wondering if that possible using VBA?

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Sacramento, California, USA
    Thanked 1 Time in 1 Post

    Re: Table Field Data Types (Access 2002 SP3)

    It's possible, but how you do it depends on how your database is set up and on your own personal preferences. An easy way is to simply create a new table with the desired structure and append the data to it using a query that converts the number to a string. If you have existing relationships that make that difficult, you can add a new column to the table and use an update query to convert and copy the data from the numeric field into the string field. Then you would delete the old field and rename the new one. Does that help?

Posting Permissions

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