Community discussion forum

Need help to create table in access mdb

Tags: access, vb6, winxp India
  • 8 months ago
    Hi all, I am using the following code to create a table in Microsoft Access (.mdb) : Conn.Execute "CREATE TABLE Sale_010309 (SALE_ID Char(8), Sale_AMT Long)" In this code, I need to create a field of type boolean. But if I use the following code, the system does not accept it. Conn.Execute "CREATE TABLE Sale_010309 (SALE_ID Char(8), Sale_AMT Long, Sale_Paid Boolean)" Please let me know the actual code to create a logical field in the table using above code. It is urgent please.
    Post was edited on 06/03/2009 11:54:32 Report abuse
  • 8 months ago
    Boolean is not a valid datatype in MSAccess you have to use yesno instead as follows. conn.execute "CREATE TABLE Sale010309 (SALEID Char(8), SaleAMT Long, SalePaid yesno)"

Post a reply

Enter your message below

Sign in or Join us (it's free).

We'd love to hear what you think! Submit ideas or give us feedback