Announcement

Collapse
No announcement yet.

Access table question

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Access table question

    So, joy of joys, I get to build an access database for my work. We have to track contract information on things that go over $1 million.

    I've figured out a number of things, but there's one thing I'm stalling on, but I'm not sure if it's even doable.

    I'd like to create a running total in the table.

    Since the invoices and contracts have change orders (COs) which can alter the amount of the document, what I'm doing is keeping the COs in the same table. I do know how to do a calculated field, but the issue is that it doesn't populate if a field is empty. So, I can tell it to add the base amount to whatever the increase/decrease amount is of the CO1, but it won't fill if CO1 is blank. And goes to negative numbers if I put it at 0.

    I looked online, but all I'm getting is info about queries.

    Is there a way to do this? Or is it something where I design a query and then pull in the results on to the form? Or... I need options. I've only done two classes on this thing, lol.
    My NaNo page

    My author blog

  • #2
    Check "conditional operators". I know that Excel has them; you can say something to the effect of "if this has no value, leave that alone; if this has a value, add it to that."
    “There are two novels that can change a bookish fourteen-year old’s life: The Lord of the Rings and Atlas Shrugged.
    One is a childish fantasy that often engenders a lifelong obsession with its unbelievable heroes, leading to an emotionally stunted, socially crippled adulthood, unable to deal with the real world.
    The other, of course, involves orcs." -- John Rogers

    Comment


    • #3
      It's been a long time, but yeah, I think NP is right. You want to set it so that the field will show $0 if the result is 0 or Nothing or Empty or NULL (these are all different things) -- whichever of those Access supports. I guess it *may* also work if you just use a result where the value is "anything less than 1 cent" ... You can just limit it to one if you can figure out what value is actually being passed.
      "For a musician, the SNES sound engine is like using Crayola Crayons. Nobuo Uematsu used Crayola Crayons to paint the Sistine Chapel." - Jeremy Jahns (re: "Dancing Mad")
      "The difference between an amateur and a master is that the master has failed way more times." - JoCat
      "Thinking is difficult, therefore let the herd pronounce judgment!" ~ Carl Jung
      "There's burning bridges, and then there's the lake just to fill it with gasoline." - Wiccy, reddit
      "Retail is a cruel master, and could very well be the most educational time of many people's lives, in its own twisted way." - me
      "Love keeps her in the air when she oughta fall down...tell you she's hurtin' 'fore she keens...makes her a home." - Capt. Malcolm Reynolds, "Serenity" (2005)
      Acts of Gord – Read it, Learn it, Love it!
      "Our psychic powers only work if the customer has a mind to read." - me

      Comment

      Working...
      X