Drop-Down List Boxes

Hello All,
I am having trouble getting my drop down list box to work. I am not new to Clarion, but havent’ programmed in about 4 years and have gone from v6 to v10. I feel like I’m a new programmer as I learn how v10 works. So…I’m not sure what step I am missing in my drop box. I am able to select from my box and the field that I want gets filled in with the correct data. The problem is when I open the form up, the drop down does not display the correct name in the drop down to correspond with the code in the record.
I know it must be something simple, but not finding what I missed.
Thanks in advance.

You need 3 things.
The key for the dropbox table in the correct order,
The checkbox for Select first element if empty needs to be checked.
The use variable for the drop list needs to be the same type as the first element in the list format
And if thats different to how you keep it, the use need to be loaded. ie if your element is a string description but you store a long, you need to fetch the appropriate record. This is often just add a relation to the primary file.

Thank you Sean. This was helpful and I got the dropboxes to work. I defined a local variable for the use variable and then primed it when I opened the form also.

Even though you have it working, my solution is different than Sean’s and much simpler. The USE variable should be a field equate label (?MyDropList) rather than a variable. That’s it, no need to add anything to the hot fields or the list format. If you use a file field as the USE variable, it will be filled on selection, with the list CHOICE() (I believe though I have never confirmed it because I don’t care).

I always name the file drop queues something like CustomerQ or ProductQ and use the corresponding FEQ of ?CustomerQ or ?ProductQ. I also change the class name to CustomerFDB or ProductFDB. That way I never have to jump around to remember what I named everything and makes my code easier to read and understand.