Results 1 to 4 of 4
  1. #1
    Darkmatter5 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jul 2012
    Posts
    11

    Help with append query to add data on the fly

    So here is my Append query currently.

    INSERT INTO Customers ( PurchaseDate, ID_Name, FirstName, LastName, Address1, Address2, City, State, Zipcode, BatteryL1, BatteryL2, BatteryR1, BatteryR2, BatterySize, Tag )
    SELECT AHC.Date, AHC.Name, AHC.[First Name], AHC.[Last Name], AHC.[Billing Address 1], AHC.[Billing Address 2], AHC.[Billing City], AHC.[Billing State/Province], AHC.[Billing Zip], AHC.[Battery - L (1)], AHC.[Battery - L], AHC.[Battery - R (1)], AHC.[Battery - R], AHC.[Battery Size], AHC.Tag
    FROM AHC;

    I have another field in the Customers table named "Organization", with this append query I need each record appended to Customers to put "AHC" in the "Organization" field while it appends each record. Is this possible?

    Thanks!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    Try

    INSERT INTO Customers ( PurchaseDate, ID_Name, FirstName, LastName, Address1, Address2, City, State, Zipcode, BatteryL1, BatteryL2, BatteryR1, BatteryR2, BatterySize, Tag, Organization )
    SELECT AHC.Date, AHC.Name, AHC.[First Name], AHC.[Last Name], AHC.[Billing Address 1], AHC.[Billing Address 2], AHC.[Billing City], AHC.[Billing State/Province], AHC.[Billing Zip], AHC.[Battery - L (1)], AHC.[Battery - L], AHC.[Battery - R (1)], AHC.[Battery - R], AHC.[Battery Size], AHC.Tag, "AHC" As Org
    FROM AHC;
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Darkmatter5 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jul 2012
    Posts
    11
    Perfect, thanks!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Append data from one query to another
    By basabnanda in forum Queries
    Replies: 7
    Last Post: 07-29-2014, 10:24 AM
  2. Replies: 2
    Last Post: 02-28-2013, 07:00 PM
  3. Add/append data to crosstab query
    By DatabaseIntern in forum Queries
    Replies: 4
    Last Post: 08-02-2012, 10:15 AM
  4. Query append data from another database
    By Eagle2012 in forum Access
    Replies: 2
    Last Post: 03-17-2012, 03:02 PM
  5. Replies: 5
    Last Post: 04-06-2011, 01:54 PM

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