Refreshing a Form

illy2k

Registered User.
Local time
Today, 06:21
Joined
Apr 21, 2003
Messages
51
I have designed a form with an option group and two check boxes within this option group. The first box is checked by default, and when this is checked some boxes in the form are locked, it doesn't let you enter data, but if you check the other box, these boxes open up, and others lock so you cannot enter data there. There is no problem, except when I use a new record button to get to a new record. The form doesn't refresh itself, so it maintains the settings of the first record in the table that the form is linked to. So the right check box is checked, but the wrong boxes are unlocked. Is there any type of code that can refresh the form after you click the new record button?:confused:
 
The checkboxes are probably reverting to their default values (not the settings of the first record).

You can place some code in the Form's On Current event to set the state of the checkboxes to what you'd like them to be. The On Current event "fires" whenever you move to another record (whether new or existing).

If you want the state of the checkboxes to be set only when you enter a new record, then place this condition in the On Current event code:
If Me.NewRecord Then
  'set the checkbox states
End If
 

Users who are viewing this thread

Back
Top Bottom