Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 23 SEP 2001 05:03:00PM C Mansutti wrote:

Hello all,

It's been a while since I've written anything in OI so I'm quite rusty (Not that I was much good before)

Anyway - All I want to do is so Simple I'm sure you'll be wodering why I'm having such a problem.

I have a Drop Down Combo box

It is tied to the key of a table

As there will never be more than 20 keys in the table

I want all the keys to appear "Sorted" in the dropdown box, the end user can choose one of the keys or create a new one.

How do I populate the drop down box?

Is there a QuickEvent process?

Is there some simple code?

I've just spent toooooo much time getting nowhere.

Could you spare 30 seconds for frustrated one man band programmer?

TIA

Claude


At 23 SEP 2001 06:41PM Donald Bakke wrote:

Claude,

I don't think this can be done strictly with QuickEvents. However, as you suggested, there is a simple way to do this via code. You can make this very sophisticated or fairly simple, depending on how "dynamic" the keys in the combobox need to be.

First of all, if you know this table will always have a limited number of keys then I recommend putting a QuickDex or RightDex on the table. This will make it much easier to populate the combobox. If you do this, then putting the following code into the CREATE event of your window will work:

Open "TABLE" to hTable then

---]Read Keys from hTable, "%RECORDS%" else Keys="

---]rv=Set_Property(@Window:".COMBOBOX", "LIST", Keys)

end else

---]/* Error trapping logic here */

end

While the above technique will work, it won't update the keys in the combobox when the user enters a new record unless the window is closed and opened again. Nor will deleted keys be updated either until the window is opened again. One way to solve that problem, if you wanted to, would be to call the exact same code as above in your WRITE and DELETEROW events.

dbakke@srpcs.com

SRP Computer Solutions, Inc.


At 24 SEP 2001 06:52PM C Mansutti wrote:

Thanks for the prompt reply Don,

I had to fish around the forum to find how to set Quickdex however… Ahh for the simple life with Arev.

Claude

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/76e42e48a568b8c085256ad00073a1e0.txt
  • Last modified: 2024/01/04 21:00
  • by 127.0.0.1