Which event to use?

  • Thread starter Thread starter Niklas Östergren
  • Start date Start date
N

Niklas Östergren

Hi!

Maby this should be a simple Q for me and yes I can always put in a masgbox
to see when an event in a form accures but I just can´t get this to work.

What I´m trying to do is to redesign a bound form when the form opens
depending on if a field in the underlying record have a value or not. What
I´d like to do is to move some controls around and set visual propertie for
a combobox (cboSelectEnlistMember) to TRUE if the field have any value and
to FALSE if not.

I allready do this when the form is opened and if the user select a special
value ("By a member") in another combobox (cboContactWay) wheré I use
AfterUpdate_Event of this cbo to redesign (move controls and dispaly the
hiden cbo). This works fine but I just can´t figure out which event on the
form to use for the same task?

TIA!
// Niklas
 
Use the Current event of the Form, so the code runs each time it loads a
record.

You probably want to use the Undo event of the form to restore it again
also, based on the OldValue.
 
I allready do this when the form is opened and if the user select a special
value ("By a member") in another combobox (cboContactWay) wheré I use
AfterUpdate_Event of this cbo to redesign (move controls and dispaly the
hiden cbo). This works fine but I just can´t figure out which event on the
form to use for the same task?

I'd suggest using the Form's Current event, which fires whenever the
user moves to another record (or to the New record).

John W. Vinson[MVP]
 
OK!

Thank´s Allen!

// Niklas

Allen Browne said:
Use the Current event of the Form, so the code runs each time it loads a
record.

You probably want to use the Undo event of the form to restore it again
also, based on the OldValue.
 
OK!

Thank´s John!

// Niklas

John Vinson said:
I'd suggest using the Form's Current event, which fires whenever the
user moves to another record (or to the New record).

John W. Vinson[MVP]
 
Back
Top