Quote:
Originally Posted by HollyB
I have an Access report that populates based on results of a query. I need the report to have checkboxes on each line for the user to click on and off independently.
I have tried using unbound checkboxes on the report and when you click one, the whole list comes on/off. When I make the boxes bound to a yes/no column in the table you cannot click them at all. It gives an message at the bottom that control cannot be edited. The reports are read only.
So, how do you create checkboxes that can be clicked on or off independently in the report?
I have also tried exporting to Word, and the checkboxes do not show up. Exporting as PDF they show up, but are not functional.
Please help me. I am a newbie.
|
in the reports detail on format evenbt set the approipriate code
eg:-
if
mycolumn1 = something then
mycheckbox1 = true else
mycheckbox1 = false
if
mycolumn2 = something then
mycheckbox2 = true else
mycheckbox2 = false
to set this code open the report in design mode
select the detail section of the report
select properties (F4)
click the tab that has 'build events' in it (think it may be other properties
then build code
lets say one of your columns is called IsProjectFinished and the relevant checkbox is called ckbProjFinished
then
if IsProjectFinished = true then ckbProjFinished = true else ckbProjFinished = false
mind you if the columns in the table are boolean you cna assign the value directly
eg
ckbProjFinished.value = IsProjectFinished
bear in mind you can also use the NOT operator to set the other value
ckbProjFinished.value = NOT (IsProjectFinished)
ie whatever value IsProjectFinished is set it to the opposite