Reset Form Variable w/ Each Record

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Lumpy
    New Member
    • Oct 2007
    • 69

    Reset Form Variable w/ Each Record

    Hi All,
    Let me just start by saying that this isn't a big deal, I did find a way to get it working, but I was just wondering what the "correct" way of going about this is.

    I am using access 2003 and have designed a form to use for customer quotes. At the beginning of the form I declare a variable to be used by the whole form, something like, public disprice as integer, and then once a discount field is filled in, it sets disprice to equal the customer discount. Once the disprice is set, I use that in other sub's within the form to calculate prices and so on. The problem I am having, is that any time I add a new record, the variable disprice and the discount field does not reset to empty or null like I want it to, to enter in a new record. When paging through the old records, each record has the right discount shown and prices figured out, but it is when I add a new record, I want that variable to be null and the discount field to go blank.

    The solution I have working right now is to clear the field when I click on the add new quote button.

    Thanks all for any help!
  • Lumpy
    New Member
    • Oct 2007
    • 69

    #2
    Never Mind all,
    I figured it out. My partner, who doesn't, well I should say isn't supposed to be messing with the programing end of things decided to set that field to have a default value and that is why it was coming up the way it was. Funny guy :D

    Thanks anyways!

    Comment

    Working...