Subject Most appropriate way to refresh a lookup combo
Author Nando Dessena
Hello,
I have three IB_Queries on a form; Query1 (companies) is the master,
Query2 is a detail query (locations) and so is Query3 (employees). In
short, I can have several locations and several employees for each
company.
In addition, each employee does refer to a company, so I have a
LookupCombo and a lookup IB_Query on the locations table. That lookup
query has the employees' DataSource as KeySource and the locations
DataSource as MasterSource (I intend to show only the locations of the
master company available for each employee).

If I insert a company, then a location and then try to insert an
employee, my lookup combo is empty because its dataset isn't refreshed
after the post on the locations dataset.
I have added a call to RefreshKeys in the employees dataset's
AfterEdit/AfterInsert event handlers, and I was wondering if this is the
most appropriate way to do it or there are any pitfalls. I don't have
the need to cope with other users inserting locations at the same time
(the application is for my personal use), but I think the RefreshKeys
call is ok for that too (I have a read-committed transaction).
Thanks
--
____
_/\/ando