Refresh form for each record

  • Thread starter Thread starter Douglas J. Steele
  • Start date Start date
I have a form with checkboxes that looks for a certian
value in a hidden text box. If the value is present the
box is checked and if not the box is unchecked. My
problem is that when I go to the next person's record the
logic is not automatically re-run, so the check boxes
appear the same for everyone. I would like to know if
there is a way to either refresh the form or call a
subroutine when the user changes records regardless of
which field the user is in on the form.

Thanks,
Dan
 
If you don't need the check box data stored in the
underlying table, you can just make the check box a
calculated control; change the control source for the
check box to something like

=Iif([HiddenTextName]=Whatever,True,False)

HTH
Sheldon Slade
 
Sheldon,

Thanks for the idea. The values of the check boxes aren't
being stored at all, but I tried to do something similar
to what you suggested and it won't let me check or
uncheck the boxes.

I want the users to be able to check and uncheck the
boxes, which then automatically populates the text field
that is stored in the table for them. This value of the
text field is a list of values that will normally get
populated from a web form, but my users want to be able
to make changes in Access.

Now that I have put my subroutine call in the On Current
event of the form everything works correctly.

Thanks again for responding

Dan
-----Original Message-----
If you don't need the check box data stored in the
underlying table, you can just make the check box a
calculated control; change the control source for the
check box to something like

=Iif([HiddenTextName]=Whatever,True,False)

HTH
Sheldon Slade
-----Original Message-----
I have a form with checkboxes that looks for a certian
value in a hidden text box. If the value is present the
box is checked and if not the box is unchecked. My
problem is that when I go to the next person's record the
logic is not automatically re-run, so the check boxes
appear the same for everyone. I would like to know if
there is a way to either refresh the form or call a
subroutine when the user changes records regardless of
which field the user is in on the form.

Thanks,
Dan

.
 
Put the code you want to execute, or a call to the procedure you want to
execute, in the Form's OnCurrent event.

Larry Linson
Microsoft Access MVP
 
Back
Top