February 23, 200916 yr Hi all. I am trying to write a database which will track restaurant reservations which include customer names, reservation times, what table they are assigned to and what seat they have been assigned to. I am having problems coming up with a way to make the database create an error message when two customers at one table have been assigned the same seat. Is there a way to script this? As it stands right now, each reservation has it's own record and each customer has their own related record in a customers table, so essentially it needs to check all the customers per reservation. I apologize if I posted to the wrong forum. Any help appreciated :D
February 23, 200916 yr See if this helps: http://fmforums.com/forum/showtopic.php?tid/198229/post/303839/#303839
February 23, 200916 yr Author hi comment. is this the only way to do this? perhaps through a validation calculation? i want the custom error message to include the other customers name who has been assigned the same seat. i am not sure what i would replace in your example that would yield the same results i'm looking for. still though, thanks for your help!
February 23, 200916 yr I am not sure what exactly you are asking. The relationship is the only way a reservation record can "know" it has a conflicting sibling. Without it, you would need to perform a find each time you create/modify a reservation. Once you have the relationship in place, it's up to you how you want to handle the conflict when it happens. A custom validation message cannot be calculated, so if you want to provide a link to the conflicting record, you will need to look for some other way - e.g. placing a big red related field on the layout.
Create an account or sign in to comment