Click here to Skip to main content
15,889,992 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is there a way to add a link in a lookup field (dropdownlist that displays)that would open the NewForm of the lookup's source? I have a app that has the user select the project name in one list, but there will be times when the project won't be added yet, it would be prefered to have a way they can just click "AddNew" in the dropdown list instead of backing out of the record and then going back in after they create a project.

I did this in 2007 I thought, but can not for the life of me figure this out in 2010, can anyone help?

Thanks
M.
Posted

1 solution

One way is to use a UNION in your SELECT (assuming that you are using SQL):
SQL
SELECT CompanyName FROM Suppliers
 UNION SELECT "Add New"

Or, of course:
SQL
SELECT "Add New"
  UNION SELECT CompanyName FROM Suppliers


This can become problematic if you are selecting more than one column from the database though.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900