Results 1 to 5 of 5
  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Syntax needed (2002)

    Hi,

    I have a form that set to continuous form and shows [totaldue] for each of the [Account Type]. This is working fine. I need to be able to allow the user to enter in the actual amount of cash they have on hand and then have it subtract from the [totaldue] for each account so they can have a visual of whether they are in a profit/loss situation. Where I'm running into problems is with the formula that will subtract the [totalonhand] from the correct [Account Type].

    For example, presently [Account Type] yields data for "checking", "Savings - unavailable" and "Savings - available". The user will enter what they have in their check book into an unbound field. Another unbound field will show the result, which should be the difference between the unbound field and [totaldue] for checking. How would I write that?

    Thanks,
    Leesha

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Syntax needed (2002)

    I cannot visualize what you are doing. Could you post a stripped down copy of the database? (Remove or replace sensitive information)

  3. #3
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Syntax needed (2002)

    Here you go. You'll see that the subform in the form footer is the one I need the help with. When the user "enters" their data the corresponding unbound text box should yield the difference between what they entered and what shows as the amount that is needed for that item, IE checking entered and checking needed.

    Leesha

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Syntax needed (2002)

    At the moment, the user cannot enter anything in the unbound text boxes since the Allow Edits property of the subform is set to No. If you change this, you can use the following control source for the Checking difference text box:
    <code>
    =DSum("[SumOfAccount Balance To Date]","qryAccountBalanceSum","[Account Type]='Checking'")-[txtCheckingonHand]
    </code>
    and similar for the other two.

  5. #5
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Syntax needed (2002)

    Thanks! Of course that worked beautifully. Thanks for the pick up on the edit piece. I had forgetten when I originally designed the form that I set it that way.

    I would never have come up with that formula on my own. Now to study it and break it down - back to trying to "think like Hans"!

    Thanks again,
    Leesha

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •