er lidt en klaphat til access, men håber i kan hjælpe og forstår mit problem. Har lavet an database med tilhørende formular. Kan dog ikke finde ud af at gøre det umuligt at dobbeltbooke ved booking af flere datoer, nogen der kan hjælpe?
If thats not possible then I think you will need to explain why you need to have a unique date field.
I can imagine that the booking table is related to some other table through a foreign key field, you can combin ethis field and the date field as the Compound key
thank you terry, what I mean is, that i want to rent a bike out from a number of bikes in a given period. Then I have made a table consisting id, rent date and return date, but I can't seem to find out how to make it impossible to book the same bike in a given period, for example make it impossible to rent the bike out from july 2nd until july 14th, and then again from july 4th until july 10th.
Hi John That explains things and using a compound key isnt going to help.
Take a look at the link neoman referes to, this explains your problem very well. There are a number of ways you can check if a bike is available for a given period but it all depends on how you design your forms.
Lets say that a customer wanted to rent a bike (any bike) for a given period. You could have a form where you entered the start data and end date and then select all the bkes which were not booked within that period. So looking at the example in the link and the period entered is ithe desired dates, you would actually want the two "bikes" where there is no period start or period end within that interval.
okay now I found part of a solution, but need a bit of code to end the program. I need to find out how to go from one form to another where when you go to the second form, it performs a check up if a checkbox is marked in the selected period. Is it clear what I mean, or total nonsense :-)
"I need to find out how to go from one form to another where when you go to the second form, it performs a check up if a checkbox is marked in the selected period"
Total nonsense :o)
No its not nonsense but I think a bit more information might help.
If a checkbox is markt for a given period on another (second) form then I would assume that the data for that form is also in a tabel, so why do you need to go to a form, which might not even be open?
Has come a bit furher, but has run into another problem, do anyone know how to make a search function on two dates? I have a startdate and endDate, and would like to get all records shown that are in that period. Can anyone help?
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.