change layout upon navigating

  • Thread starter Thread starter Jean-Paul
  • Start date Start date
J

Jean-Paul

Hi,
I have this small problem
I open a form and depending on the value of a checkbox, fields are
visible of not.
When I change the value from false to true, the fields are displayed as
they should, whenI change it again to false, they are hidden, so this is OK
There is a navigation button to go to the next or the previous form in
the recordset.
So, when I go from one record to the next one, the program should see if
the value is true or false and display the fileds or hide them.
How can I make this work?
Thanks
JP
 
Jean-Paul said:
I open a form and depending on the value of a checkbox, fields are
visible of not.
When I change the value from false to true, the fields are displayed as
they should, whenI change it again to false, they are hidden, so this is OK
There is a navigation button to go to the next or the previous form in
the recordset.
So, when I go from one record to the next one, the program should see if
the value is true or false and display the fileds or hide them.


You need to eun the same code from the form's Current event.

If it's just one or two lines of code, you could just
Copy/Paste them from the check box's AfterUpdate event
procedure. If there is a substantial amount of code or just
to avoid duplicated code, create a private Sub to make the
controls visible or not and then call the sub from both the
AfterUpdate and Current events.
 
Back
Top