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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Checkbox on a Acc2000 report

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am trying to update Checkboxes on a report. Error states that I cannot update field. At first I am just set all of the fields to false. I can't seem to update the report field. Then I will set up a recordset and select from an intersection table and then set check box to true if value is found in table.
Code tried:

For ChkServNumber = 1 To ChkServCnt
Me.[("ChkServ" & ChkServNumber)] = False
Next ChkServNumber

For ChkScaleNumber = 1 To ChkScaleCnt
Me("ChkScale" & ChkScaleNumber) = False
Next ChkScaleNumber
 
Not quite sure I understand what you're trying to do, but reports are for reporting data, not changing it. Perhaps you mean to update an unbound control?
 
Correct! I have sereral unbound checkbox controls on a page. Let say Checkbox1 through Checkbox20. Now, I set up a recordset. I move through the record set. If I find a value "10" in the recordset, I will need to set Checkbox 10 to true. That is what I intend to do.

BUT FIRST - I want to clear all of the Checkboxes (set them to false.) But I am getting an error.

ChkBoxCnt = 20
For ChkBoxNumber = 1 To ChkBoxCnt
Me("ChkBox" & ChkBoxNumber) = False
Next ChkBoxNumber

 
YES!!!!! YES!!!!!

I figured it out last night.

ChkBoxCnt = 20
For ChkBoxNumber = 1 To ChkBoxCnt
Me("ChkBox" & ChkBoxNumber).ControlSource = "=False"
Next ChkBoxNumber

I am now able to set the values. YESSSSSSSSSS!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top