0
votes

Hi i have a combo box in a form (unbound form). The user has to enter some data, select a value from a combo box, push Save button, and then keep entering data until all the values from the combo are done. My combo has the RowSource Property set to a SELECT statement that retrieves all the data all the time. What i want: when the user selects a value from the combo and push the Save button the selected value gets removed from the combo. Example:

The combo has two values: -25 to 35 years -36 to 45 years

The user selects a value :-36 to 45 years, enter other data and push Save button

As a result the combo should only have one option: -25 to 35 years

(after that it keeps on the same form, to enter data until no available options on combo)

1
Please display your select statement? we can help you write the where clause! - Hiten004
are the values "saved" to a table? - Barranka

1 Answers

0
votes

Form: create a form with text box where you save select value with comma sparated string exmaple: "1","2","3" when you press the save button

Use the following SQL for the Dropdown, which will eliminate the selected value from the drop down

SQL query

SELECT Table1.Value
FROM Table1
WHERE (((Table1.Value) Not In ([Forms]![Form1]![Text0])));

Table:

table1
1
2
3
4
5
6

Result in drop down for above sql senerio

Result
4
5
6