By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,194 Members | 1,684 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,194 IT Pros & Developers. It's quick & easy.

Inventory Problem - Field Validation

P: 12
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.
Sep 15 '08 #1
Share this Question
Share on Google+
3 Replies

P: 12
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"?
Sep 15 '08 #2

Expert Mod 15k+
P: 31,761
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.
Sep 15 '08 #3

Expert Mod 15k+
P: 31,761
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.
Sep 16 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.