September 21, 200421 yr Newbies 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
September 21, 200421 yr 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
September 21, 200421 yr 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
September 21, 200421 yr 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.
September 22, 200421 yr Author Newbies 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
Create an account or sign in to comment