it--solutions
Posts: 24
|
Posted: 12/15/2014, 3:45 AM |
|
I have found a way of setting a default <option selected value> in a listbox populated from a database
in this example my database structure & data is
table: common_list_data
id | list | bound | description | option_default
1 | jobs | Started | Started | 0
2 | jobs | Not Yet Started | Not Yet Started | 1
go about the normal way to populate the listbox from the database
then on the Properties window under events tab - right click on 'before show' and add custom code
$db = new clsDBdatabase();
$job_status_default = CCDLookUP("description", "common_list_data", "list='jobs' and option_default='1'", $db);
$add_jobs_record->job_status->SetValue($job_status_default);
$db->next_record();
$db->close();
|