none
Access web app - Save result from query to table (at once) RRS feed

  • Question

  • I have a complex query which gives me back one result. I want to save this result to a table (in order to use it outside the web app. by using bcs).

    I can create a datamacro to achieve this. So fire the query > create record > set field...

    However the result gives me about 30 fields, that means 30 times "set field" in te macro. Is there a better/easy way to achieve this?

    Thanks, Mike

    Thursday, February 26, 2015 8:59 AM

Answers

  • Hi Mike.

    I'm not quite following you on this one.

    You said, "...the result gives me about 30 fields, that means 30 times "Set field"....."

    What do you mean by result is 30 fields? Are you saying this defined query will always return 30 fields from the source table(s)?

    Are you wondering if you could write one SetField action to dump all 30 values into a specific table? If that is your question then no that cannot be done. Each time you write data to a field in a data macro with an Access web app, you must write one SetField action for each field you are wanting to write to.

    --------------------
    Jeff Conrad - Access Junkie - MVP Alumnus
    Senior Content Developer - Modern Assistance and Support Experience - Microsoft Corporation

    Author - Microsoft Access 2013 Inside Out
    Author - Microsoft Access 2010 Inside Out
    Co-author - Microsoft Office Access 2007 Inside Out
    Access 2007/2010/2013 Info: http://www.AccessJunkie.com

    ----------
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Use of included script samples are subject to the terms specified at
    http://www.microsoft.com/en-us/legal/Copyright/Default.aspx
    ----------

    • Marked as answer by Sp2010_Mike Friday, February 27, 2015 7:36 AM
    Thursday, February 26, 2015 7:52 PM

All replies

  • Hi Mike.

    I'm not quite following you on this one.

    You said, "...the result gives me about 30 fields, that means 30 times "Set field"....."

    What do you mean by result is 30 fields? Are you saying this defined query will always return 30 fields from the source table(s)?

    Are you wondering if you could write one SetField action to dump all 30 values into a specific table? If that is your question then no that cannot be done. Each time you write data to a field in a data macro with an Access web app, you must write one SetField action for each field you are wanting to write to.

    --------------------
    Jeff Conrad - Access Junkie - MVP Alumnus
    Senior Content Developer - Modern Assistance and Support Experience - Microsoft Corporation

    Author - Microsoft Access 2013 Inside Out
    Author - Microsoft Access 2010 Inside Out
    Co-author - Microsoft Office Access 2007 Inside Out
    Access 2007/2010/2013 Info: http://www.AccessJunkie.com

    ----------
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Use of included script samples are subject to the terms specified at
    http://www.microsoft.com/en-us/legal/Copyright/Default.aspx
    ----------

    • Marked as answer by Sp2010_Mike Friday, February 27, 2015 7:36 AM
    Thursday, February 26, 2015 7:52 PM
  • Hi Jeff, indeed that was my question.

    Thanks.

    By the way, Jeff. I bought your book. Great!
    • Edited by Sp2010_Mike Friday, February 27, 2015 12:11 PM
    Friday, February 27, 2015 7:36 AM
  • Hi Mike,

    Thanks for the nice comments on my book. I hope you have found it useful in your study of Access 2013 web apps and desktop applications.

    Good luck with your continued studies and your web app projects.

    --------------------
    Jeff Conrad - Access Junkie - MVP Alumnus
    Senior Content Developer - Modern Assistance and Support Experience - Microsoft Corporation

    Author - Microsoft Access 2013 Inside Out
    Author - Microsoft Access 2010 Inside Out
    Co-author - Microsoft Office Access 2007 Inside Out
    Access 2007/2010/2013 Info: http://www.AccessJunkie.com

    ----------
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Use of included script samples are subject to the terms specified at
    http://www.microsoft.com/en-us/legal/Copyright/Default.aspx
    ----------

    Saturday, February 28, 2015 12:01 AM