Results 1 to 2 of 2

Thread: Creating a boolean field in access

  1. #1

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

    Post

    Dear Vb programmers,

    I try to create a boolean field in an access .
    The next code I made:

    Set Ws = DBEngine.Workspaces(0)
    Set Db = Ws.CreateDatabase(DbSettings, dbLangGeneral)

    SqlSel = "Create Table Customer ( Customer Text"
    SqlSel = SqlSel + ", DatumM" + " boolean"
    SqlSel = SqlSel + ");"

    Db.Execute SqlSel 'creating a table

    The boolean is not correct
    What do I have to fill in? (You know also the syntax for autonumber?)

    Nice greetings,

    Michelle.

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827

    Post

    I've never done anything in Access other than to make databases for use in VB, but what you have there looks a little odd. Usually to add strings you use the & operator, not the +.

    Also this line looks strange:

    SqlSel = SqlSel + ", DatumM" + " boolean"

    Why not just this?

    SqlSel = SqlSel + ", DatumM boolean"
    (Only maybe it should be:
    SqlSel = SqlSel & ", DatumM boolean")

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