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

How can I display a checkmark chr(251) in a report

Status
Not open for further replies.

jeep2001

Programmer
Dec 15, 2005
134
US
I have a report which displays the value of a true false checkbox as -1 or 0. I would love to show the actual check value which is ascii value 251. I cant seem to get it to display in the report like I want. What would the actual syntax be??
 
I find that 251 is not a tick for me. Do you dislike the checkboxes that are native to Access?
 
I am interested in this one as well, so I will see who responds. But here is a trick/novelty I have been doing. It is probably not very portable, but we all have mirrored installs on our machines.

in my text boxI have as the control source
=IIf([blnYesNo],"J","L")
where [blnYesNo] is a boolean field

So if it is true, it puts in a J and an L if false. Then I set the font to "WingDings"

The result is a Smiley Face if True and a Sad Face if false. I did not see a good check symbol, but search around. I also use conditional formatting so my Smilies are Green and my Sad's are red. Ok, maybe a little overkill, but it gets attention.
 
Actually, I thought about it and this sort of works
=IIf([blnYesNo],CHR(251),"")

Except it returns Character 150, not 251. I get a "u" with a "^" over top of it. So the logic is right I just do not know enough about ASCII to explain what is happening.
 
Now I know why. I wrote the below code out of curiosity
Code:
Private Sub Text0_Click()
  Dim i As Integer
  For i = 128 To 255 Step 3
    Debug.Print i & " " & Chr(i) & "   " & i + 1 & " " & Chr(i + 1) & "   " & i + 2 & " " & Chr(i + 2)
  Next i
End Sub

And printed out the top set

128 € 129 ? 130 ‚
131 ƒ 132 „ 133 …
134 † 135 ‡ 136 ˆ
137 ‰ 138 Š 139 ‹
140 Œ 141 ? 142 Ž
143 ? 144 ? 145 ‘
146 ’ 147 “ 148 ”
149 • 150 – 151 —
152 ˜ 153 ™ 154 š
155 › 156 œ 157 ?
158 ž 159 Ÿ 160
161 ¡ 162 ¢ 163 £
164 ¤ 165 ¥ 166 ¦
167 § 168 ¨ 169 ©
170 ª 171 « 172 ¬
173 ­ 174 ® 175 ¯
176 ° 177 ± 178 ²
179 ³ 180 ´ 181 µ
182 ¶ 183 · 184 ¸
185 ¹ 186 º 187 »
188 ¼ 189 ½ 190 ¾
191 ¿ 192 À 193 Á
194 Â 195 Ã 196 Ä
197 Å 198 Æ 199 Ç
200 È 201 É 202 Ê
203 Ë 204 Ì 205 Í
206 Î 207 Ï 208 Ð
209 Ñ 210 Ò 211 Ó
212 Ô 213 Õ 214 Ö
215 × 216 Ø 217 Ù
218 Ú 219 Û 220 Ü
221 Ý 222 Þ 223 ß
224 à 225 á 226 â
227 ã 228 ä 229 å
230 æ 231 ç 232 è
233 é 234 ê 235 ë
236 ì 237 í 238 î
239 ï 240 ð 241 ñ
242 ò 243 ó 244 ô
245 õ 246 ö 247 ÷
248 ø 249 ù 250 ú
251 û 252 ü 253 ý

Then I read that there are a few Varying extended sets. The one with 251 equal a check is the most popular. Unfortunately there is no check here.
 
This is a simple way to do it. In your report creat a simple IIF command to test the value and then write a letter as the value (Do not remember which character for a check). Make sure the field font is formatted with the WingDing font and you can do check marks, smiley faces, or even set the color.

Hope this helps,

Steve
AKA Y2KCobra
 
And the really easy way to get a check mark is to use the Access Checkbox! :)
 
However, if the report is to be exported, it is best not to use anything except words, as most of these fiddly bits do not export well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top