FarmboyEsq
Programmer
Hello,
I have bound checkbox on a continuous form. It is bound to one of the tables in the underlying query. I am able to check and uncheck the boxes at will and with code like the following:
DoCmd.GoToRecord , , acLast
RowCnt = Me.CurrentRecord
DoCmd.GoToRecord , , acFirst
LoopCnt = 1
Do While LoopCnt <= RowCnt
Me.ChkBox.Value = True
If LoopCnt < RowCnt Then
DoCmd.GoToRecord , , acNext
End If
LoopCnt = LoopCnt + 1
Loop
DoCmd.GoToRecord , , acFirst
But, when I try to use this same technique to set the visible property or enabled property, all of the check boxes on the form are affected.
I.E. This sets all of them to invisible:
Me.ChkBox.Visible = False
If I embed this in a loop, whatever executes last, is the setting for all of the check boxes on the form.
Am I missing something? Many thanks in advance.
Stg
I have bound checkbox on a continuous form. It is bound to one of the tables in the underlying query. I am able to check and uncheck the boxes at will and with code like the following:
DoCmd.GoToRecord , , acLast
RowCnt = Me.CurrentRecord
DoCmd.GoToRecord , , acFirst
LoopCnt = 1
Do While LoopCnt <= RowCnt
Me.ChkBox.Value = True
If LoopCnt < RowCnt Then
DoCmd.GoToRecord , , acNext
End If
LoopCnt = LoopCnt + 1
Loop
DoCmd.GoToRecord , , acFirst
But, when I try to use this same technique to set the visible property or enabled property, all of the check boxes on the form are affected.
I.E. This sets all of them to invisible:
Me.ChkBox.Visible = False
If I embed this in a loop, whatever executes last, is the setting for all of the check boxes on the form.
Am I missing something? Many thanks in advance.
Stg