Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    280
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Change property in a table (Access 2000)

    I want to convert the field Required property from False to True,but i get the error " variable not defined"
    Can you help me ?

    Set tdf = dbs.TableDefs("Customers")
    ' set additional field properties
    Set fld = tdf.Fields("houseid")
    fld.Properties("Required") = True
    fld.Properties.Append prp

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

    Re: Change property in a table (Access 2000)

    The error describes the problem precisely: you use a variable prp that hasn't been defined or set. You don't need it here, and you don't need to use the Properties collection either. The following will do:

    Set tdf = dbs.TableDefs("Customers")
    Set fld = tdf.Fields("houseid")
    fld.Required = True

Posting Permissions

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