One thing you can do is to just remove it from the dropdown options so that it doesn't show up and the user can't select it. This would be the simplest way to accomplish not allowing users to order something that is sold out.
Another way is to use a recordset to get the various different availabilities of the combinations of options and store these in variables. Then on the form, you could write out a function that would check the availability in the onsubmit of the form. Customization like this isn't supported however, so you would have to implement it yourself.