Undocumented way for combo box text to disappear?

  • Thread starter Thread starter malcolm
  • Start date Start date
M

malcolm

I have an unbound form for Orders whose data is retrieved
via code in a class object. The Orders form has 4 combo
boxes, several other text boxes and several command
buttons. One command button opens a Totals form showing
the totals for all line items for the order selected on
the Orders form. This Totals form opens on top of the
Order form as both are centered on the screen. The first
time the Totals form closes, the contents of the combo
boxes on the Orders form are visible. If the Totals form
is then reopened and closed, the contents of 3 of the
combo boxes disappear and need to be refreshed by
pressing F9. Before pressing F9, the information is still
there but no text is visible. The drop-down lists are
populated but blank. I can select an item even though I
cannot see what it is and the correct data is retrieved.
If I drag the Orders form to one side of the screen so
the Totals form does not overlap the Orders form when it
opens, the contents of the combo boxes on the Orders form
never need to be refreshed. Also, if I then gradually
drag the Totals form over the Orders form, it can "eat
up" the text visible in the combo boxes on the orders
form. However, memory (not screen memory) is not the
problem as the text in the combo boxes and the drop down
lists reappear if I click on the Orders form and press
F9. Is there a known coding solution?
 
Access sometimes doesn't refresh a form when you think it would. You can
add a Me.Refresh to the GotFocus event of the form so that it will refresh
when other forms that cover it close. This is equvalent to the F9 key.

Kelvin
 
Unbound combo boxes in the Form Header section can behave as you describe
under Access 2000.

If there are no records in a continuous form and no records can be added,
all the controls in the detail section disappear. When this happens, combo
boxes in the Form Header section are still visible, but Access has problems
displaying them under all recent versions of Access.

There is a third scenario involving combo display. This involves a
continuous form where the bound column is zero-width and the RowSource of
the combo is assigned in the Current event of the form. In this case - even
if the value in the combo is in the RowSource, it may not display correctly
in all versions of Access.
 
Back
Top