How to hide checkbox when the datasource contain bool value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi friends,
I have a column in access report in which a particular
column(say "columnBool")is attach to datasource whose datatype is BIT.
Hence a checkbox appears in column "columnBool".
For value 1 the checkbox appears as checked and for value 0 the checkbox is
blank. What we want is that for value 0, the checkbox should appear, only
checked checkbox should appear in report.
Any help as how to not display checkbox when the datasource value is 0 will
be great.

Cheers,
Alpha
 
One approach might be to add code to the Format event of the report section
in which the checkbox is placed (e.g., the Detail section). That code will
evaluate the value of the, say, [columnBool] and set the visible property
accordingly ... something like:

Me!chkColumnBool.Visible = [ColumnBool]

(actual syntax may vary).
 
Jeff,
I think my ques was not much clear, I donot want to hide whole column
[columnBool] but the checkbox which is present in each row depending upon the
value which I am getting from backend.

Jeff Boyce said:
One approach might be to add code to the Format event of the report section
in which the checkbox is placed (e.g., the Detail section). That code will
evaluate the value of the, say, [columnBool] and set the visible property
accordingly ... something like:

Me!chkColumnBool.Visible = [ColumnBool]

(actual syntax may vary).

--
Good luck

Jeff Boyce
<Access MVP>

Abhi poddar said:
Hi friends,
I have a column in access report in which a particular
column(say "columnBool")is attach to datasource whose datatype is BIT.
Hence a checkbox appears in column "columnBool".
For value 1 the checkbox appears as checked and for value 0 the checkbox is
blank. What we want is that for value 0, the checkbox should appear, only
checked checkbox should appear in report.
Any help as how to not display checkbox when the datasource value is 0 will
be great.

Cheers,
Alpha
 
Perhaps it was my explanation that wasn't clear enough. I was describing
using the Format event of the report section to alter the Visible property
of the checkbox for determining the display of each single row of data shown
in the report.

I was not suggesting changes to the underlying data or table.

Jeff Boyce
<Access MVP>

Abhi poddar said:
Jeff,
I think my ques was not much clear, I donot want to hide whole column
[columnBool] but the checkbox which is present in each row depending upon the
value which I am getting from backend.

Jeff Boyce said:
One approach might be to add code to the Format event of the report section
in which the checkbox is placed (e.g., the Detail section). That code will
evaluate the value of the, say, [columnBool] and set the visible property
accordingly ... something like:

Me!chkColumnBool.Visible = [ColumnBool]

(actual syntax may vary).

--
Good luck

Jeff Boyce
<Access MVP>

Abhi poddar said:
Hi friends,
I have a column in access report in which a particular
column(say "columnBool")is attach to datasource whose datatype is BIT.
Hence a checkbox appears in column "columnBool".
For value 1 the checkbox appears as checked and for value 0 the
checkbox
is
blank. What we want is that for value 0, the checkbox should appear, only
checked checkbox should appear in report.
Any help as how to not display checkbox when the datasource value is 0 will
be great.

Cheers,
Alpha
 
Back
Top