Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2009
    Posts
    4

    Question Unanswered: Dynamic table name

    I need to do a SELECT ... INTO table_name where the table_name is made up of a fixed value and todays date. E.g table created today would be
    MYTABLE_070809

  2. #2
    Join Date
    Jul 2009
    Posts
    185
    Where are you using the select statement.

  3. #3
    Join Date
    Jul 2009
    Posts
    4
    In an Access 2003 query. The query reads from 2 other tables and creates a new table.

  4. #4
    Join Date
    Jul 2009
    Posts
    4
    OK, got it.

    Created a Form with a Command button

    Command button has On Click sub that does Call MCFSQuery

    Module MCFSMismatch has a Public Function called MCFSQuery that contains code to build filename, store the full SQL statement in a string then do a DoCmd.R u nSQL.

    Since the query code is long it took awhile to get the line continuation all set up. And since the filename I wanted had spaces in it I had to figure out where to put the [ and ] around it.

Posting Permissions

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