When trying to map database results to widgets, remember that not all widgets can use the same functions (like SetValue()) under all circumstances to set their properties. Notable examples for exceptions are "choice boxes" and "combo boxes". It might be preferrable to have a function SetData(), UpdateData(), ClearData() for each dialog instead - far more control over what is actually happening to the widgets, though unfortunately a little bit more typing.