[Edit: While composing this message, I had guests arrive, so that delayed my post. I see that Bob and Erika already posted by the time I did, but I will leave my post here in case it can help add to theirs.]
First of all, you probably don't want to use @XUserSelect within PopulateListElement, because that will only return one choice to fill the list with. You usually would use @XUserSelect to present the user with a list of choices from which you pick one to fill a regular element. But it sounds like you are using a Combo Box type of element, for which you want to give a list of choices that come from all the current entries that already are present in the Merchant field.
Second, you should be using ".db" rather than ".dsr" after the filename. If it is the same application file as the one you are working in, you could use @Filename (without quotes) instead of manually typing the path and filename.
Third, when referencing a filename, it needs to be with respect to the "Start In" (or "Current Working Directory"); which most often is "C:\Sesame". For example, if your application files are in "C:\Sesame\Data", and your Start In folder is "C:\Sesame", then you would use "Data\Estimator.db" as the filename. (If you are using a shortcut to start Sesame, you can check its properties for the Start In folder.)
Now, assuming you are using a Combo Box element, you might use something like the following:
PopulateListElement(Merchant, @XLookupAll("Data\Estimator.db", "/=", "Merchant_Info!Merchant", "Merchant"))
Notice that I am using @XLookupAll rather than @XUserSelect. Finally, if your Estimator.db file is actually in a folder named Estimator, then you may need to replace "Data\Estimator.db" with "Estimator\Estimator.db", or possibly "Data\Estimator\Estimator.db".
|