Hi
I am making a database for several boat companies in Norway.
One of the forms is a form to fill out which boats are going to be hauled out of water for the winter, on which dates and which hours.
On a full day the companies can lift in total 21 boats of water.
So i have made the form so that there are 21 droplists, where they can select the member-number of the customer they want to register for the lift, and then all the information about the member automatically appears in the fields to the right of the droplist, including a field that says S or M, whether it is a Sailboat or a Motorboat.
The problem is that the companies can only handle 1 sailboat every hour, and in addition 2 motor boats (or just 3 motorboats).
So i really need to make a function that can check if more than 2 customers with sailboat are registered in the same hour. Preferably one would get a messagebox saying something if you tried to add a second customer with a sailboat on the same hour.
I am no good with visual basic, but im guessing that i need some kind of IF statement saying;
IF number1.boattype = S AND number2.boattype = S THEN something
elseif number2.boattype = S AND number3.boattype = S THEN something
elseif number1.boattype = S AND number3.boattype =S THEN something
I have been crawling the net to find an answer, but it isnt that easy to find, as i don't know excactly what to search for.
Could anyone please help me with this?
I am making a database for several boat companies in Norway.
One of the forms is a form to fill out which boats are going to be hauled out of water for the winter, on which dates and which hours.
On a full day the companies can lift in total 21 boats of water.
So i have made the form so that there are 21 droplists, where they can select the member-number of the customer they want to register for the lift, and then all the information about the member automatically appears in the fields to the right of the droplist, including a field that says S or M, whether it is a Sailboat or a Motorboat.
The problem is that the companies can only handle 1 sailboat every hour, and in addition 2 motor boats (or just 3 motorboats).
So i really need to make a function that can check if more than 2 customers with sailboat are registered in the same hour. Preferably one would get a messagebox saying something if you tried to add a second customer with a sailboat on the same hour.
I am no good with visual basic, but im guessing that i need some kind of IF statement saying;
IF number1.boattype = S AND number2.boattype = S THEN something
elseif number2.boattype = S AND number3.boattype = S THEN something
elseif number1.boattype = S AND number3.boattype =S THEN something
I have been crawling the net to find an answer, but it isnt that easy to find, as i don't know excactly what to search for.
Could anyone please help me with this?