rolandroland Posted September 17, 2006 Share Posted September 17, 2006 Hello anyone, I have created a database so that I can make appointments for students to see advisors. There are four advisors in the office. I have the advisors identified by individual check boxes. I also have created date and time fields. I was wondering if there was a way to create a calcuation or some other way to validate whether an advisor has an appointement for a specific date and time and someone tries to make an appointmet for the same advisor with a different student, then an error message will let the person know that the time and date for that advisor is already taken. I have tried some is not empty calcs for the fields, but it only works for the time and date and gives me an error message just for the date and time. I can't figure out how to make it distinguish between advisor. I hope I have been clear and someone might be able to help me with this. Thank you in advance. Roland smiley-cry Link to comment Share on other sites More sharing options...
aaa Posted September 18, 2006 Share Posted September 18, 2006 Hi, Roland! Create one table too - Advisors, where you will have your all advisors. Your value list you can construct from this table. Make Relation from advisors to your Students table by AdvisorID(must be sorted by date) Then in the Avisors table create portal for this relation After, in this layout you will see for each advisor all his training dates. You can include here the time fields too. Sorry if i am not clear. I created example in attachment. Link to comment Share on other sites More sharing options...
rolandroland Posted September 18, 2006 Author Share Posted September 18, 2006 Thank you AAA, I probably wasn't very clear. Your reply is a great start. I didn't think of making advisors into a separate table. My main problem though, is making the follwing fields unique: Advior Date Time I would like for an error message to appear if someone has entered a duplicate time or date for a particulare advisor. I can't seem to get the calculation quite right. I may be looking in the wrong places here and it could be someone has already asked this question, I just can't seem to find a simple calc or way to acheive this. Any other help you can provide is really appreciated and thank you for your quick response and ideas. It is truly very helpful. Roland Link to comment Share on other sites More sharing options...
rolandroland Posted September 18, 2006 Author Share Posted September 18, 2006 Sorry, that should be time and date, not time or date. The time and date should be tied together so that I don't get an error message just on the date or time alone. This is what seems to be happening because I don't know how to tie the two together along with it recoginizing the advisor. Thanks again. Roland Link to comment Share on other sites More sharing options...
aaa Posted September 19, 2006 Share Posted September 19, 2006 Hi, rolandroland! Not only for Advisor time and date can not be the same. It must be for student too. And i changed attachment such, that this will be correct in two case. If record is not correct one of two fields: isduplicate.. became "?". I attached example, if you will have questions, i will be glad to answer. The second way is validating fields Date,Time,Student,Advisor for your goal, but it may be little difficult. I am afraid that i again dont understanded. Link to comment Share on other sites More sharing options...
rolandroland Posted September 19, 2006 Author Share Posted September 19, 2006 hey aaa, Beautiful. Yes, it is a little more complicated, but I can see how you did it and it will work perfect. Thank you so much for all of your help. smiley-smile Roland Link to comment Share on other sites More sharing options...
Recommended Posts