Form based calculation involving query results

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sstidham
    New Member
    • Feb 2008
    • 11

    Form based calculation involving query results

    I don't even think this is possible, but I wanted to make sure before I told my boss we need another solution.

    Essentially he wants to do a Query by Form.

    He would like to be able to type the goal into one of 4 fields, and then multiply what he types into the field by the result of another query.

    Essentially it looks like this:

    Forms!goal!txtR R*PTO![% of Max]

    the % of Max is the result of another query.

    Is this even possible? I know I can SEARCH for things based on text boxes in a form, but can you have a function based on data input into a form?

    If not I'll try to find another solution but this is the way he would like to do it.

    Thanks so much. You guys are always so helpful.
  • MindBender77
    New Member
    • Jul 2007
    • 233

    #2
    Originally posted by sstidham
    Essentially he wants to do a Query by Form.

    He would like to be able to type the goal into one of 4 fields, and then multiply what he types into the field by the result of another query.

    Essentially it looks like this:

    Forms!goal!txtR R*PTO![% of Max]

    the % of Max is the result of another query.
    To answer your question: Yes, this is very possible.
    You could have four unbound textboxes on a form for the goal. Another for the result of your other query. A final textbox for the end result.

    After the one of the four goals has been entered, an Append query could add data to a temp table using criteria from the goals. A dlookup function could then be called to populate the next textbox. Finally, the last textbox could then be automatically populated with the end result.

    The temp table would be purged on the Form Close event.

    Hope this points you in the right direction,
    Bender

    Comment

    • missinglinq
      Recognized Expert Specialist
      • Nov 2006
      • 3533

      #3
      Please remember to provide a meaningful Title for any threads you start! This helps to ensure that other members, and also the general public, will have a better chance of finding answers to similar questions. It is difficult for the experts to answer questions when there is not enough details provided to understand the problem.

      Please take the time to read the Posting Guidelines, paying particular attention to Give a clear title to your question.

      Thank you and Welcome to bytes!

      Linq ;0)>

      Comment

      • sstidham
        New Member
        • Feb 2008
        • 11

        #4
        Thank you for your help! I really appreciate it.

        And I will make sure my Form Posts have clearer titles. I do apologize.

        Thanks guys! (and gals if applicable)

        Comment

        Working...