98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Access Training and help » access-training-courses - Form problem
access-training-courses - Form problem
Resolved · Low Priority · Version Standard
Paul has attended:
Access Intermediate course
Access Advanced course
Form problem
I want to have an error message pop up if I select something from a drop down menu that has already been selected in a different record on the same form. Any ideas?
RE: form problem
Paul,
I assume you want the error message to come up and actually stop them from using that option. If it was me I would go about this in a slightly different way. I would create another table with the options in, with a column for the option, a column for the ID and a column for a Boolean value of true or false. Then using VBA I would populate the drop list using the options where in the Boolean column the value is false. Then when you select an option it will set the value in the Boolean column to true and will no longer appear in the drop down list.
By using this method you will not present your users with an option they cannot use, and there will be no need for an error message.
However if you want to stick to your original idea I would use VBA and a query to find out if any other record has used the option you just select if they have then show error message and if it is not used then allow.
Hope this helps
David
RE: form problem
Hi David. I think the boolean value sounds like a good idea. I'll just have to work out how to use vba now.
This project is beginning to grow faster than I'm learning *gulp*
RE: form problem
Paul,
If you have had no experience of VBA before it may be worth you have a look at our VBA course. If this is the kind of thing you will be doing on a regular basis, then the VBA course may be worth it.
Any problems with the implementation let me know
David
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Access tip:Splittng a databaseSplit your database into two (at least). |