Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Create memo type field (Access 2000)

    Can you help me with the creation of a field type memo with a code.I have a code that creates an YesNo field, and i want to rearange it , to change it so, that to create a field of the type "memo".
    The code i have is the following
    Set tdf = dbs.TableDefs("Customers")
    Set fld = tdf.CreateField("Fillip", dbBoolean)
    tdf.Fields.Append fld
    tdf.Fields.Refresh
    ' set additional field properties
    Set fld = tdf.Fields ("Fillip")
    fld.Properties("DefaultValue") = "= False"
    Set prp = fld.CreateProperty("Fillip", dbText, "Yes/No")
    fld.Properties.Append prp

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Create memo type field (Access 2000)

    Change dbBoolean to dbMemo in the CreateField statement.
    You'll want to remove or change the line that sets the default value.

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Create memo type field (Access 2000)

    By the way, if you click in the word CreateField in the Visual Basic Editor, you'll get the built-in help, with links to related subjects such as the available data types.

    The same information is also available on the MSDN website:
    CreateField Method
    Type Property

Posting Permissions

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