Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    South Africa

    Question Unanswered: change data type in code

    I used the following code to inport an excel file:

    DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97, "Stock_on_Hand", "uAFGRI\Stock on Hand.xls", True

    the first field is ctreated as a number data type. How do I change this to a text data type?

    thanks in advance

  2. #2
    Join Date
    Jan 2004

    Re: change data type in code

    Go in into your Excel file, highlight the colum that you want as text, right-click the colum and select Format Cell, go to the tab "Number" and select text. Now when you import that ino Access it should remain a text field.
    In abundance of water only the fool is thirsty. Bob Marley.

Posting Permissions

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