Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2010
    Posts
    2

    Unanswered: Append Query (maybe VBA?)

    I've searched through a lot of places, and found a few that are close, but I can't seem to find the correct solution for my problem (probably because I'm almost a complete VBA newbie, and even then not so well-versed in Access).

    Anyways, I'm trying to make a button on a form in Access 2007 (which serves at the input form - called Input_Screen - for a table called List) to append the data from List to a larger database called CHARGES.

    The fields in List are:
    SITE
    PDATE
    PAMOUNT
    DESC
    DESC1
    ACHGROUP
    Deduct/Add
    Initial

    The fields in CHARGES are:
    SITE
    PDATE
    PAMOUNT
    DESC
    DESC1
    ACHGROUP

    I only want to append the data for the fields that are currently in CHARGES from List (disregarding the Deduct/Add and Initial fields). I'm also trying to figure out a second button to clear the List table completely, so I can start over with a clean database (I'm generating reports and such off of it that will change, but I want to keep the DB CHARGES for sort of an archive, as well as a few more uses I have in mind.

    Any help is much appreciated... again, sorry that I'm so entirely helpless in VBA.

  2. #2
    Join Date
    Oct 2009
    Posts
    340
    this does not involve vba.

    first, one must have a key field (unique value - never repeating) in both tables that cross reference the two tables correctly.

    assuming that exists - then you make a query, find duplicates of one to the other to establish which set are to append.

    then you make an appendquery using this first query & the list table that appends to the charges table.

  3. #3
    Join Date
    Jul 2010
    Posts
    2
    Is a key field absolutely necessary? It asked me on Access when I first created the (list) database, but I said I didn't need the unique value thing. I know for a fact that all the records from the List database need to be added to the end of the charge database. Does that change things or is it the same?

    Any idea of the general syntactical usage of the append query? Should I use the wizard or the embedded macro? The whole query wizard thing really confused me, so if there's an easier, more straightforward, way through using an assigned macro I'd rather use that.

Posting Permissions

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