Results 1 to 4 of 4
  1. #1
    iscinar is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2013
    Posts
    10

    Create table with the Insert Into

    Create a table with the Insert Into


    How to fill in my data using.

    I can lay my spreadsheet.
    But how to fill in the data in the same query

    Sample data for the first line
    AdSoyad = iscinar
    Onay = -1
    Tarih = 28.08.2013



    Code:
    CREATE TABLE MyTable
     (
        Kimlik COUNTER not null primary key,
    AdSoyad VARCHAR,
     Onay BIT,
        Tarih DATETIME
      
     );
    
    
    CurrentDb.Execute INSERT INTO MyTable ???????? 'How should it be
    
    





  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    CurrentDb.Execute "INSERT INTO MyTable(AdSoyad, Onay, Tarih) VALUES('iscinar', -1, #8/28/2013#)"

    Probably should review http://allenbrowne.com/ser-36.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    iscinar is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2013
    Posts
    10
    how it will be used in the query
    CurrentDb give error


    Code:
    CREATE TABLE MyTable 
    Kimlik COUNTER not null primary key, AdSoyad VARCHAR, Onay BIT, Tarih DATETIME);
    CurrentDb.Execute "INSERT INTO MyTable(AdSoyad, Onay, Tarih) VALUES('iscinar', -1, #8/28/2013#)"

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Those are two separate sql actions. Both need CurrentDb.Execute command.

    To make one action requires SELECT INTO statement but I don't think that applies to your situation. Review http://www.w3schools.com/sql/sql_select_into.asp

    Why are you creating table with code?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 05-20-2013, 01:45 PM
  2. Replies: 2
    Last Post: 12-20-2011, 07:33 AM
  3. Replies: 1
    Last Post: 12-28-2010, 11:24 AM
  4. Replies: 2
    Last Post: 12-22-2010, 01:46 PM
  5. Replies: 0
    Last Post: 02-24-2010, 12:56 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums