madman411 Posted February 23, 2009 Posted February 23, 2009 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
comment Posted February 23, 2009 Posted February 23, 2009 See if this helps: http://fmforums.com/forum/showtopic.php?tid/198229/post/303839/#303839
madman411 Posted February 23, 2009 Author Posted February 23, 2009 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!
comment Posted February 23, 2009 Posted February 23, 2009 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.
Recommended Posts
This topic is 5753 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