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

    variable not defined (Access 2000)

    To the table TblClients i want to add the fied TurnDown, DataType Yes/No, Format Yes/No, DefaultValue False, Indexed Yes(DuplicatesOK).

    I receive the error for dbYesNo as "variable not defined"
    The code under question, where i get the error is the following :

    ' create the field TurnDown
    Set fld = tdf.CreateField("TurnDown", dbYesNo)
    tdf.Fields.Append fld
    fld.Properties("DefaultValue") = False
    tdf.Fields.Refresh

    May i ask for help ?

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

    Re: variable not defined (Access 2000)

    Use dbBoolean instead of the non-existing dbYesNo.

    To see other possible values, activate the Object Browser in the Visual Basic Editor by pressing F2. Type DataType into the search box, and press Enter.

Posting Permissions

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