Results 1 to 2 of 2

Thread: Creating boolean field in Access table

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    455

    Post

    Dear VB programmers,

    Last question was wrong!!

    I want to create i a Access database a table with a boolean field.

    Set Ws = DBEngine.Workspaces(0)
    Set Db = Ws.CreateDatabase("c:\new.mdb", dbLangGeneral)
    Db.Execute "Create Table NewTable ( NewField Text);"

    The field NewField will now be the data type text.
    What do I have to fill in to get the field NewField boolean?

    Nice regards,

    michelle.

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845

    Post

    Db.Execute "Create Table NewTable ( NewField yesno);"

    works but doesn't set the format...

    ------------------
    Mark Sreeves
    Analyst Programmer

    [email protected]
    A BMW Group Company

Posting Permissions

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



Click Here to Expand Forum to Full Width