Update Table Query: Automatically handle “Enter Parameter Value” prompts?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







3















EDIT: Here are two database Files that demonstrate an applied example of the problem:




Example_DBs.zip (Zipped due to 2 link limitation.)




Note: The missing Field in "Not Working.mdb" is intentional. Please have a look at the attached diagram for further clarification.



I'm trying to create a single, Update Query in Access 2007 that does all of these 3 things:





  1. Update (skipping zero-length values)

  2. Append

  3. Automatically handle missing Fields without showing any "Enter Parameter Value" prompts.


I've managed to accomplish the 1st & 2nd items on my own, but I'm stumped on the 3rd. In essence, what I'm looking for is a way of telling Access to automatically use a zero-length/null value for any missing Field(s) the Query encounters, so long as it does not involve manually modifying the Table beforehand. Automation is key. And that's where you guys come in.



Here is a diagram of the desired results from a set of sample Tables:



Sample Tables Diagram



And here is the Update Query's SQL code adjusted for those sample Tables:



UPDATE Table_1 RIGHT JOIN Table_2 ON Table_1.ID = Table_2.ID SET Table_1.ID = NZ([Table_2].[ID],[Table_1].[ID]), Table_1.Company = NZ([Table_2].[Company],[Table_1].[Company]), Table_1.Address = NZ([Table_2].[Address],[Table_1].[Address]), Table_1.Phone = NZ([Table_2].[Phone],[Table_1].[Phone]);


Any help would be greatly appreciated.










share|improve this question
















bumped to the homepage by Community 1 min ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • FYI - It appears that (as of the time of this comment) the link to download the example DBs no longer works (It results in the message "Application AisMDMMInTAOji478kuNxz is unavailable").

    – RDFozz
    Oct 3 '17 at 20:11


















3















EDIT: Here are two database Files that demonstrate an applied example of the problem:




Example_DBs.zip (Zipped due to 2 link limitation.)




Note: The missing Field in "Not Working.mdb" is intentional. Please have a look at the attached diagram for further clarification.



I'm trying to create a single, Update Query in Access 2007 that does all of these 3 things:





  1. Update (skipping zero-length values)

  2. Append

  3. Automatically handle missing Fields without showing any "Enter Parameter Value" prompts.


I've managed to accomplish the 1st & 2nd items on my own, but I'm stumped on the 3rd. In essence, what I'm looking for is a way of telling Access to automatically use a zero-length/null value for any missing Field(s) the Query encounters, so long as it does not involve manually modifying the Table beforehand. Automation is key. And that's where you guys come in.



Here is a diagram of the desired results from a set of sample Tables:



Sample Tables Diagram



And here is the Update Query's SQL code adjusted for those sample Tables:



UPDATE Table_1 RIGHT JOIN Table_2 ON Table_1.ID = Table_2.ID SET Table_1.ID = NZ([Table_2].[ID],[Table_1].[ID]), Table_1.Company = NZ([Table_2].[Company],[Table_1].[Company]), Table_1.Address = NZ([Table_2].[Address],[Table_1].[Address]), Table_1.Phone = NZ([Table_2].[Phone],[Table_1].[Phone]);


Any help would be greatly appreciated.










share|improve this question
















bumped to the homepage by Community 1 min ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • FYI - It appears that (as of the time of this comment) the link to download the example DBs no longer works (It results in the message "Application AisMDMMInTAOji478kuNxz is unavailable").

    – RDFozz
    Oct 3 '17 at 20:11














3












3








3








EDIT: Here are two database Files that demonstrate an applied example of the problem:




Example_DBs.zip (Zipped due to 2 link limitation.)




Note: The missing Field in "Not Working.mdb" is intentional. Please have a look at the attached diagram for further clarification.



I'm trying to create a single, Update Query in Access 2007 that does all of these 3 things:





  1. Update (skipping zero-length values)

  2. Append

  3. Automatically handle missing Fields without showing any "Enter Parameter Value" prompts.


I've managed to accomplish the 1st & 2nd items on my own, but I'm stumped on the 3rd. In essence, what I'm looking for is a way of telling Access to automatically use a zero-length/null value for any missing Field(s) the Query encounters, so long as it does not involve manually modifying the Table beforehand. Automation is key. And that's where you guys come in.



Here is a diagram of the desired results from a set of sample Tables:



Sample Tables Diagram



And here is the Update Query's SQL code adjusted for those sample Tables:



UPDATE Table_1 RIGHT JOIN Table_2 ON Table_1.ID = Table_2.ID SET Table_1.ID = NZ([Table_2].[ID],[Table_1].[ID]), Table_1.Company = NZ([Table_2].[Company],[Table_1].[Company]), Table_1.Address = NZ([Table_2].[Address],[Table_1].[Address]), Table_1.Phone = NZ([Table_2].[Phone],[Table_1].[Phone]);


Any help would be greatly appreciated.










share|improve this question
















EDIT: Here are two database Files that demonstrate an applied example of the problem:




Example_DBs.zip (Zipped due to 2 link limitation.)




Note: The missing Field in "Not Working.mdb" is intentional. Please have a look at the attached diagram for further clarification.



I'm trying to create a single, Update Query in Access 2007 that does all of these 3 things:





  1. Update (skipping zero-length values)

  2. Append

  3. Automatically handle missing Fields without showing any "Enter Parameter Value" prompts.


I've managed to accomplish the 1st & 2nd items on my own, but I'm stumped on the 3rd. In essence, what I'm looking for is a way of telling Access to automatically use a zero-length/null value for any missing Field(s) the Query encounters, so long as it does not involve manually modifying the Table beforehand. Automation is key. And that's where you guys come in.



Here is a diagram of the desired results from a set of sample Tables:



Sample Tables Diagram



And here is the Update Query's SQL code adjusted for those sample Tables:



UPDATE Table_1 RIGHT JOIN Table_2 ON Table_1.ID = Table_2.ID SET Table_1.ID = NZ([Table_2].[ID],[Table_1].[ID]), Table_1.Company = NZ([Table_2].[Company],[Table_1].[Company]), Table_1.Address = NZ([Table_2].[Address],[Table_1].[Address]), Table_1.Phone = NZ([Table_2].[Phone],[Table_1].[Phone]);


Any help would be greatly appreciated.







ms-access update table parameter






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 2 '15 at 14:45







Barry Stuckman

















asked Jul 30 '15 at 19:34









Barry StuckmanBarry Stuckman

163




163





bumped to the homepage by Community 1 min ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 1 min ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • FYI - It appears that (as of the time of this comment) the link to download the example DBs no longer works (It results in the message "Application AisMDMMInTAOji478kuNxz is unavailable").

    – RDFozz
    Oct 3 '17 at 20:11



















  • FYI - It appears that (as of the time of this comment) the link to download the example DBs no longer works (It results in the message "Application AisMDMMInTAOji478kuNxz is unavailable").

    – RDFozz
    Oct 3 '17 at 20:11

















FYI - It appears that (as of the time of this comment) the link to download the example DBs no longer works (It results in the message "Application AisMDMMInTAOji478kuNxz is unavailable").

– RDFozz
Oct 3 '17 at 20:11





FYI - It appears that (as of the time of this comment) the link to download the example DBs no longer works (It results in the message "Application AisMDMMInTAOji478kuNxz is unavailable").

– RDFozz
Oct 3 '17 at 20:11










1 Answer
1






active

oldest

votes


















0














You can't have 'missing fields' in a query without getting a prompt. Your June updates can not reference the phone column that does not exist and your July can not reference address. You need 2 different queries. If your business logic can't determine which query to run then you can use the Fields Collection of the TableDef object.






share|improve this answer
























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "182"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f108603%2fupdate-table-query-automatically-handle-enter-parameter-value-prompts%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    You can't have 'missing fields' in a query without getting a prompt. Your June updates can not reference the phone column that does not exist and your July can not reference address. You need 2 different queries. If your business logic can't determine which query to run then you can use the Fields Collection of the TableDef object.






    share|improve this answer




























      0














      You can't have 'missing fields' in a query without getting a prompt. Your June updates can not reference the phone column that does not exist and your July can not reference address. You need 2 different queries. If your business logic can't determine which query to run then you can use the Fields Collection of the TableDef object.






      share|improve this answer


























        0












        0








        0







        You can't have 'missing fields' in a query without getting a prompt. Your June updates can not reference the phone column that does not exist and your July can not reference address. You need 2 different queries. If your business logic can't determine which query to run then you can use the Fields Collection of the TableDef object.






        share|improve this answer













        You can't have 'missing fields' in a query without getting a prompt. Your June updates can not reference the phone column that does not exist and your July can not reference address. You need 2 different queries. If your business logic can't determine which query to run then you can use the Fields Collection of the TableDef object.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 4 '15 at 15:02









        byrdzeyebyrdzeye

        68837




        68837






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Database Administrators Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f108603%2fupdate-table-query-automatically-handle-enter-parameter-value-prompts%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Liste der Baudenkmale in Friedland (Mecklenburg)

            Single-Malt-Whisky

            Czorneboh