Newbies netcomm1 Posted September 21, 2004 Newbies Posted September 21, 2004 I have a Database set up as a quotation database. One field (called "status") is a member of a Value List that has values for "Current Sale", "Sale Lost" and "Sale Complete" and are displayed as radio buttons. The other field is called "Invoice Number". Now some users when clicking on the "Sale Complete" button are forgetting to enter an "Invoice Number". Is it possible to force a user to enter an number into the "Invoice Number" field but only when they click on the "Sale Complete " Radio Button and not on the "Current" or "Sale Lost" button. I know you can click on "not empty" for valadition for a field but can you do this or something similar for one radio button within a field that is a member of a value list. Thanks
LaRetta Posted September 21, 2004 Posted September 21, 2004 Attach this validation to your Status field: Status = "Sale Complete" and not IsEmpty(InvoiceNumber) xor Status <> "Sale Complete" Unclick 'Validate only if field modified' and click 'Strict ...' and enter a message telling your User they must 'Revert' and enter an Invoice Number. LaRetta
-Queue- Posted September 21, 2004 Posted September 21, 2004 Or, Status = "Sale Complete" xor IsEmpty(InvoiceNumber)
LaRetta Posted September 21, 2004 Posted September 21, 2004 Oh JT! We've bumped into this one before! I thought I had learned to take advantage of xor last time this came up between us! Guess not. I guess I need to work on really understanding xor. Thanks for a second lesson on it. LaRetta
-Queue- Posted September 21, 2004 Posted September 21, 2004 Well, your solution would be fine, if you changed xor to or. Naturally, Status can't be both equal to something and not equal to something at the same time. So xor would be a bit redundant there. Status = "Sale Complete" xor IsEmpty(InvoiceNumber) means (Status = "Sale Complete" and not IsEmpty(InvoiceNumber)) or (Status <> "Sale Complete" and IsEmpty(InvoiceNumber)), which has the added benefit of checking that no InvoiceNumber is entered if the Status is not "Sale Complete". I could be wrong, but it seems like this is what was asked.
Newbies netcomm1 Posted September 22, 2004 Author Newbies Posted September 22, 2004 Thanks for that solution, it worked a treat. It also had the advantage that old records (there were a few thousand) that already had "Sale Complete" ticked did not ask for an Invoice Number when browsing through them. Great Forum, excellent Knowledge, again many thanks
Recommended Posts
This topic is 7368 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now