Inventory Problem - Field Validation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • glitke
    New Member
    • Sep 2008
    • 12

    Inventory Problem - Field Validation

    Here's the deal. I receive parts from one company, refurb them, and then send them back. So, they send me 10 parts on one MSO#, which is like a PO#, and I can only ship back a max of 10 parts that refer to that MSO#. What I need to do is limit a quantity field on a form so that I don't send back more parts than I receive on my MSO.

    I've created a query that returns the maximum amount I can send back based on the MSO#.

    How do you tie the quantity field on my form to the number I have in my query so that whatever quantity someone inputs in the quantity field does not exceed the number from the query? I've tried to using validation but haven't be able to make it work. I've also used the expression builder without success.
  • glitke
    New Member
    • Sep 2008
    • 12

    #2
    Here's the expression I used in the "Validation Rule" but it doesn't like.

    <=(Sum(([T - Main Frame]![Quantity]) WHERE ((([T - Main Frame]![Status] = "Received") OR ([T - Main Frame]![Status] = "Shipped") OR ([T - Main Frame]![Status] = "Scrapped") ) AND ([T - Main Frame]![Part #] = [Part #]) AND ([T - Main Frame]![MSO #] = [MSO #])))))

    After I created the Query I tried this:

    <=([Q - Limit Quantity]![SumofQuantity])

    Am I trying to do this the right way? Or is there another route that will work? What "syntax" am I using that isn't usable in "Validation Rules"?

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32635

      #3
      If you can post the data you're working with (the SQL of the query may be enough) then we will have something to work from.

      While MSO# & PO# do give clues as to the type of data you're working with, it's very little help explaining what context you're starting from and we need to think within.

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32635

        #4
        This thread is now discontinued (locked) as another version has been posted (Validation Error - Invalid Syntax - Operand w/o operator).

        Glitke did try to delete this thread to keep things tidy but was unable to.

        Comment

        Working...