Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    513

    simple boolean syntax ?

    adding a new field to a table with code (which is not the problem... the field is created);
    having trouble getting the syntax right to set the default value to "True" for boolean fields...


    <...>
    Set db = OpenDatabase(DbPath)
    Set Td = db.CreateTableDef(TdName)
    'Specify the fields.
    With Td
    Set Fd = .CreateField("AdditionalInfoRequired", dbBoolean)
    Fd.DefaultValue = dbFalse 'have also tried dbNo, "No"...
    .Fields.Append Fd
    <...>


    End With
    'Save the table.
    db.TableDefs.Append Td


    (I would presume it's obvious; but when you're a self-taught, with no one across the aisle to ask the dumb ?s to...)
    you guys become heros, andd for that... big thanx in advance)
    Mark

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Untested, but try 0.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Join Date
    Jul 2010
    Location
    Fire Island Pines, NY
    Posts
    513
    work perfectly (thanx)

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. simple syntax ?
    By markjkubicki in forum Queries
    Replies: 2
    Last Post: 10-09-2012, 10:31 AM
  2. simple SQL syntax with hyperlink
    By markjkubicki in forum Programming
    Replies: 2
    Last Post: 01-18-2012, 06:58 PM
  3. Simple code syntax question
    By mseeker22 in forum Programming
    Replies: 1
    Last Post: 07-07-2011, 03:55 AM
  4. Simple Syntax Help
    By cvegas in forum Programming
    Replies: 7
    Last Post: 04-20-2011, 01:46 PM
  5. simple syntax question
    By markjkubicki in forum Programming
    Replies: 6
    Last Post: 09-14-2010, 04:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums