Search code examples
formsms-accessdata-entry

Is it possible to copy only certain fields from previous record in an Access Form?


The Products database I'm working on is pretty straight forward but the product table contains over 120 fields for each product. This is due to the varying requirements of online retailers such as Amazon, Wal Mart and 10 others. Each requires some unique information. Much of the data can be automated/defaulted but quite a lot must be entered by a clerk.

Of the data that has to be entered, a great deal of it repeats from product to product. Think T-Shirts, for example. The same product can exist in different colors and different sizes. Each record would have the exact same info for every field except for SKU, UPC, Color, Size and sometimes Title.

With a shirt that has 5 different sayings, in 8 colors and 8 sizes that comes down to 320 products where only 5 fields need to be changed from record to record.

Is it possible to create a command that would copy the previous record but leave certain fields blank in order to force a data entry clerk to change/enter that info? Just a simple copy record would leave it open for errors and missed changes to the data.

I'm open to any suggestions, not just a copy record solution. My main goal is to reduce the data entry while ensuring fields that must be changed from record to record are changed.

Thanks, all!


Solution

  • Create a query that copies only the data elements you want copied, leaving the 5 changing fields blank. Trigger that query from a button or something. Simple example: Table1 has 5 columns and 1 row of data:

    design  |   size    |   foo     |   fabric  |   color
    =====================================================================
    1       |   small   |   wooo    |   cotton  |   green
    

    You want everything except foo copied:

    INSERT INTO Table1 ( design, size, fabric, color)
    SELECT Table1.design, Table1.size, Table1.fabric, Table1.color
    FROM Table1;
    

    After executing that SQL you have:

    design  |   size    |   foo     |   fabric  |   color
    =====================================================================
    1       |   small   |   wooo    |   cotton  |   green
    1       |   small   |           |   cotton  |   green
    

    Note that 'foo' is blank for the second row.