Excluding last selected value (1 Viewer)

Singh400

Registered User.
Local time
Today, 06:29
Joined
Oct 23, 2008
Messages
138
I have a form (frmStatus). It’s in continuous forms view. It pulls information from tblTypeOfStatus. I have a total of 15 statuses, but for the sake of making stuff easy lets say 5.

What current happens:

I select one of the five, and that value is stored fine, and the form creates a new combo box to select another status for that particular booking (FYI any number of statuses can apply to one booking).

Now in the new combo box that is created, I am still able to select one of five, whereas I would like it be one of four.

I have already put measures in place to alert the end user when they have selected a status that has already been applied (shared primary key in my junction table).

But I would like to prevent the end user from ever having the option to apply the same status twice to one booking.

I figure it's some sort of SQL statement (similar to what you use in cascading combo boxes) & and a .requery? But I can't nail it down exactly. Any help would be greatly appreciated.

Image:
 

Singh400

Registered User.
Local time
Today, 06:29
Joined
Oct 23, 2008
Messages
138
Ok either I didn't explain myself properly and know has no idea what I'm going on about or it's not possible. Any nudges in the right direction?

Code:
SELECT tblTypeOfStatus.TypeOfStatus FROM tblTypeOfStatus WHERE tblTypeOfStatus.TypeOfStatus <> cboStatus.Value

Is the line of thinking I'm on...
 

Users who are viewing this thread

Top Bottom