Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2003
    Location
    Malaysia
    Posts
    4

    Unanswered: Change Fields Type using VB

    Hello,

    Let say i have a table with field F1, which type is Number (i am using MS Access).

    How to change the type to be text using VB?

    TQ

  2. #2
    Join Date
    Jul 2003
    Posts
    48

    Re: Change Fields Type using VB

    If you want to change the value while the field is stored in a variable in VB then you can use:

    Dim strNewVar as string
    strNewVar = CStr(rst!F1)

    If you want to change the value in the table then you will need to run an Alter table SQL statement:

    ALTER TABLE tblFieldType
    ALTER COLUMN F1 Text(50);

  3. #3
    Join Date
    Jul 2003
    Location
    Malaysia
    Posts
    4

    Thanks

    TQ

Posting Permissions

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