Using SQL statement to add up budget for depts. - InfoPath Dev
in

InfoPath Dev

Using SQL statement to add up budget for depts.

Last post 11-07-2006 08:14 AM by Michael71. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 11-06-2006 08:26 AM

    • Michael71
    • Top 50 Contributor
      Male
    • Joined on 10-07-2006
    • Mclean, Virginia-USA
    • Posts 283

    Using SQL statement to add up budget for depts.

    I have 6 different departments and all of them have a different department budget. I'm storing their budget information in a database. How do I query just for one department and add that department budget up when a user openings up a form. Example....

    the user clicks a drop down box that says: Application Department

    but I have 6 other department in the same database and their monthly budget report. How and where do I write a query statement to query just that department and sum up all of its previous budget data for that year.
  • 11-06-2006 07:58 PM In reply to

    Re: Using SQL statement to add up budget for depts.

    Hi Michael,

    You could add an OnAfterChange event handler (code) that gets called when they select the department. Or, you could add a rule that fires when a value changes and the rule could query the database based on the value. This is tricky and will require some hardcoding because the query strings don't support passing parameters.

    The other possibility is to use our Database Accelerator Suite which will allow you to do this without writing any code.

    Good luck!
    Patrick Halstead
    Project Manager at Qdabra
  • 11-07-2006 06:51 AM In reply to

    • Michael71
    • Top 50 Contributor
      Male
    • Joined on 10-07-2006
    • Mclean, Virginia-USA
    • Posts 283

    Re: Using SQL statement to add up budget for depts.

    How much does the Database Accelerator Suite cost?
  • 11-07-2006 08:09 AM In reply to

    • Michael71
    • Top 50 Contributor
      Male
    • Joined on 10-07-2006
    • Mclean, Virginia-USA
    • Posts 283

    Re: Using SQL statement to add up budget for depts.

    Patrick,

    I tried a rule, but I couldn't figure it out. Could you get me started?
  • 11-07-2006 08:14 AM In reply to

    • Michael71
    • Top 50 Contributor
      Male
    • Joined on 10-07-2006
    • Mclean, Virginia-USA
    • Posts 283

    Re: Using SQL statement to add up budget for depts.

    Patrick,
    What type of code will I have to enter in the OnAfterChange event handler.....I guess VBScript or VB.net.....help please
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.