Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2004
    Posts
    16

    Unanswered: create tables in access with vba

    I need to gather lots of info from a bunch of tables and shove it into another bunch of tables.

    My question is: how do I use vba in access to automate the query creation and how to avoid massive warnings that access gives out for me to click on once I dare create a new table.

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Lightbulb

    To create a table via VBA use
    PHP Code:
      Dim tbl As TableDeffld As Field
        Set tbl 
    dbs.CreateTableDef("yourTAbleName"
       
    ' Creating the fields
       Set fld = tbl.CreateField("yourFieldName", "yourFieldType", yourFieldsize) 

  3. #3
    Join Date
    Mar 2004
    Location
    belgium
    Posts
    290
    if you mean, that you are reorganising existing table data in new tables, in that case i have done that by using an array.

    i read one table in the array (or in case you have a large table record per record)
    and add to the array (elementlist, row) an destination table (recordset)

    with for next edit and update.

  4. #4
    Join Date
    Sep 2004
    Location
    Tampa, FL
    Posts
    520
    to supress the warning use this in your code
    DoCmd.SetWarnings False
    Darasen

Posting Permissions

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