IF condition on a form

dragon2309

Registered User.
Local time
Today, 07:59
Joined
Feb 28, 2006
Messages
10
Hi everyone, i have a form for bookings. People book by entering (among other stuff), the date and the booking slot.

Basically, what i need to do is have it so that only certain booking slots can be chosen on differnt days... for example, the booking slot of "Eve Extension" can only be used when the date refers to a Friday or Saturday, any other days it would not be allowed.

Is there any fool proof way of doing this, keeping in mind i dont exactly know VBA at all....

cheers, dragon
 
Search for the WeekDay Function in the Access help
 
oooh, thats what i needed, thnks DES, ok, so now i at least have a source to read the weekday from... Now my other bit of the problem. It is a drop down combo box, it gets its values from a Value List, not a table or anythign, is there a way to make a massive IF statement (or CASE statement, but i dont know how to structure those at all), to be able to make only certain options appear, or only certain options available for clicking.

The main thing is that I CANNOT choose "Eve Extension" on a Sunday (represented as a number, number 7. Even if i have to dabble my hand into VBA (im expecting to) then its gotta be worth it... Im guessing (in psuedo)
Code:
IF [WeekDay] == 7

echo"combo box limitations here"

else echo"combo box fallback variant here";

obviously, my roots are in PHP, as you can see from my code theory. But i need to do this in access, anyone....??

dragon :)
 
dont worry, i changed it all round, now i have a new price box, its value is dependant no the outcome of several VBA If statements, works now, cheers.
 

Users who are viewing this thread

Back
Top Bottom