Refreshing a Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I use a form (called Contact Form) that displays buttons according to the
data e.g. if there is a client enquiry, the 'Manage Enquiry' button is
visible. I test for the data in the formCurrent event and set the buttons
accordingly.

The Contact Form is made invisble whilst using the Enquiry Form. If the
enquiry is closed, the Contact form should not diplay the 'Manage Enquiry'
button, but when it becomes visible the button shows unless I move forward a
record and then back to the original record. I have tried putting the code
that sets the visibility of the buttons in the Dirty and GotFocus events but
neither of these makes the form reflect the true state of the data when it
becomes visible again.
Thanks





Managing the enquiry makes the
 
My guess is that the Activate event fires. Call Form_Current from that
event. Or, put the specialized code for the visibility (I recommend
setting the button's Enabled property, but you may find differently) in
a separate Sub, and call that from both Current and Activate.

But, if you make the form visible, that must be somewhere from code.
Nice place to have the synchronisation call.
 
Back
Top