Add a "<Add New>" value to a combo box dropdown list.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need help adding a "<Add New>" value to a combo box... My form has 2 combo
boxes.

One named "make" displays makes of vehicles, & one named "model" displays
models.

The values of "model" are contingent upon the value of "make". Whenever I
change the value for "make", a DoCmd.Requery "model" takes place.

The criteria of the query limits the results to those where both tables are
equal, and unless I add a "<Add New>" to every make, I am unable to get the
"<Add New>" to come up on the dropdown list for "model".

I tried adding the "<Add New>" to the underlying table for "model" , but it
gets filtered out of values for the list.

Thanks in advance
Walter
 
RIP said:
I need help adding a "<Add New>" value to a combo box... My form has
2 combo boxes.

One named "make" displays makes of vehicles, & one named "model"
displays models.

The values of "model" are contingent upon the value of "make".
Whenever I change the value for "make", a DoCmd.Requery "model" takes
place.

The criteria of the query limits the results to those where both
tables are equal, and unless I add a "<Add New>" to every make, I am
unable to get the "<Add New>" to come up on the dropdown list for
"model".

I tried adding the "<Add New>" to the underlying table for "model" ,
but it gets filtered out of values for the list.

Thanks in advance
Walter

Use a Union query as the rowsource of the combo box, using a technique
similar to that described on this page:

http://www.mvps.org/access/forms/frm0043.htm
Forms: Adding "All" to a listbox or combobox

That's talking about adding "all" to the list, but it should be easily
to adapt it to add "<Add New>".
 
Are you using a query as the basis of your combobox?

Try using a UNION Query.

For example,

SELECT ModelName
FROM YourModelTable
WHERE YourModelTable.Make = Forms!Formname!Comboname
UNION
SELECT "<Add New>"
FROM YourModelTable



Th
 
Back
Top