Quote:Just to clarify that the variable declarations go in Global, and then the rest in the on element exit programing.
Duane,
Place it all in the on element exit.
I find that the simplest ways to accomplish these tasks are 1 step at a time.
First in the database you are going to retrieve the data from create the new element as Bharat has suggested. The first part of your element needs to be what you will actually search on. In Bharats example
You are making an element just for displaying, this is how your user will decide what company to choose
So in the lines below you started with the code first then company name then project name
This gave you data formatted like such
TOLL26.1, Toll Bros., South Riding Glen,
TOLL26.2, Toll Bros., South Riding Fairway,
TOLL23.4, Toll Bros., Belmont Carriages,
TOLL23.8, Toll Bros., Belmont Tournaments,
So when you type TOL in your search element, it would return all the choices above in the selection box.
(The simplest method for you at this time might be to mass update existing data into the new display element and add logic so every time new data is entered it places the data correctly in the display element.)
Once you have your display data element correct in the database you are retrieving from step 2 will be to open the database that holds the element you are going to have the selection box used with and add the code Bharat described earlier into the on element exit program area.
I would then reconcile and test the database and be certain the selection box is working properly.
Once you are happy with the selection box move to step 3 and use Xlookup logic to fill the fields.
If anything is not clear give us a shout. We are all learning together, and between all of us together we will figure it out.