Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bound Check Box Visible/Enable Property on Continuous Form

Status
Not open for further replies.

FarmboyEsq

Programmer
Apr 2, 2007
17
0
0
US
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
 
That's the way continuous forms work. Remember that you only have one checkbox. You can see lots of them on the screen but they are all the same checkbox so you can't have some enabled and some not.
 
You may set the enabled property via conditional formatting.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thank you both for the help. These were pretty much the answers I was finding elsewhere, but I was hoping against hope for some other angle.

Thanks again.

Stg
 

Actually, at least thru v2003, Conditional Formatting thru Menu - Format is not available for checkboxes or radio buttons.

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top