Can anyone suggest how I might get an embedded browse on my form to show industry code information correctly? Here is my problem.
Referring to the schematic diagram below, I have a main form which shows all my client records in an Explorer-like display - clients shown in a browse list (BROWSEmain) on the left and the client details for the selected client on the top right.
I also have industry codes showing in another browse (Browse1) and another classification system in one other browse (Browse2).
The set on which this main form is based looks like this:
- client table (clientno is the unique key)
- industry codes table (linked to clientno in 1-to-many relationship)
- other classification (linked to clientno in 1-to-many relationship)
I allow no updating on the main form at all. Clicking on the "show" button opens the Industry Codes form (see attached) and allows the user to see:
- all the industry codes in a list box on the left, and
- all the assigned industry codes for the currently selected client in a second list box on the right.
The user can then add to or remove from the list of codes for the selected client.
The problem I have is as follows. After the user adds to or removes from the industry codes for the selected client, BROWSE1 on the main form displays codes incorrectly. The display problems are numerous including: line where code was previously now displayed as blank on a white background; remaining code displayed repeatedly, removed code still shows; added code not shown.
I know my industry code update script is working correctly, for example if I close the main form and open it again at the same client, the BROWSE1 now displays the correct information.
I have tried forcing BROWSE1 to update by including the following code in the OnActivate event attached to my main form, but to no avail:
I have also tried including a order expression for the industry numeric code on the set (so that it's different to the default record number - previous experience with another problem with browses in A5). But this doesn't seem to work either (A5 won't allow numeric order by expressions, even when I use the str() function).
So, does anyone have any good way of overcoming this problem with my browse display? I just want the display to show correctly after updating the industry code for a client without having to close and re-open the form again.
Referring to the schematic diagram below, I have a main form which shows all my client records in an Explorer-like display - clients shown in a browse list (BROWSEmain) on the left and the client details for the selected client on the top right.
I also have industry codes showing in another browse (Browse1) and another classification system in one other browse (Browse2).
The set on which this main form is based looks like this:
- client table (clientno is the unique key)
- industry codes table (linked to clientno in 1-to-many relationship)
- other classification (linked to clientno in 1-to-many relationship)
I allow no updating on the main form at all. Clicking on the "show" button opens the Industry Codes form (see attached) and allows the user to see:
- all the industry codes in a list box on the left, and
- all the assigned industry codes for the currently selected client in a second list box on the right.
The user can then add to or remove from the list of codes for the selected client.
The problem I have is as follows. After the user adds to or removes from the industry codes for the selected client, BROWSE1 on the main form displays codes incorrectly. The display problems are numerous including: line where code was previously now displayed as blank on a white background; remaining code displayed repeatedly, removed code still shows; added code not shown.
I know my industry code update script is working correctly, for example if I close the main form and open it again at the same client, the BROWSE1 now displays the correct information.
I have tried forcing BROWSE1 to update by including the following code in the OnActivate event attached to my main form, but to no avail:
Code:
parentform.commit() parentform.resynch() parentform.refresh_layout() ' Refresh form layout. ' browse1.activate() browse1.resynch() ' Refresh industry codes browse. ' browse2.activate() browse2.resynch() ' Refresh other classifications browse.
So, does anyone have any good way of overcoming this problem with my browse display? I just want the display to show correctly after updating the industry code for a client without having to close and re-open the form again.
Comment