Hello to all, i have an issue with contitional formating in icontinuous forms .i want to change the font from Italic to strikethrough .The standard formating does not have this option so i tried with vba but it doesn't work properly.any suggestions?
Hello to all, i have an issue with contitional formating in icontinuous forms .i want to change the font from Italic to strikethrough .The standard formating does not have this option so i tried with vba but it doesn't work properly.any suggestions?
Programmatically changing control property changes for ALL instances of control on form. Why do this on a form? Do it in a report with Detail section format event.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
June7,thanks for your replay ,but i have a list of materials showing on the forms and sometimes i want to cansel some of them with out deleting
them .because they might have been ordered.(History order)so the user can quickly see the changes that have been made and the of course to export them in the report......
Not really understanding. Changes to what - the order? A strikethrough is not deleting so exactly what are you wanting to strikethrough?
Last edited by June7; 04-08-2025 at 12:35 PM.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
i made a mistake before i wanted to say without deleting from the list.i have standard contitional formating when the materials were ordered or not .but i want to change the font name with the strike through when the material have been cancelled.
you can download a free strikethrough font.
change your text field to Long text (Rich text format) so you can apply Any font to it.
use something other than strikethrough - for example, set the forecolor to a lighter shade, use italics (or both), use a different back colour. Set normal text to be bold, cancelled to be normal. Have a separate control to indicate 'cancelled'. Plenty of options.
The only way to use strikethrough would be to use richtext and set the font - but choose a font that support strikethrough - see this example https://www.access-programmers.co.uk...ortcut.320457/
Never downloaded a font so decided to see what I could do. Found https://www.1001fonts.com/bptypewrite-font.html
Downloaded file then right click > Install for All
The font shows up in FontName property list.
Every computer using DB would need to have font installed.
Can dynamically format text in UNBOUND textbox set as RichText by calling a custom function. I set textbox FontName property with Courier New. In ControlSource call function:
=FormatText([TextToFormatField],[CriteriaField])
Custom function like:
Or instead of VBA, this expression in textbox:Code:Function FormatText(t, a) If a = "this value" Then FormatText = "<font face=BPtypewriteStrikethrough>" & t & "</font>" Else FormatText = t End If End Function
=IIf([CriteriaField]="this value","<font face=BPtypewriteStrikethrough>" & [TextToFormatField] & "</font>",[TextToFormatField])
Is it really worth all this bother? Why not just set color with Conditional Formatting? A 'greyed out' effect would likely be just as good or better than strikethrough.
Last edited by June7; 04-08-2025 at 10:02 PM.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
As others have indicated, strikethrough isn't available in Access.
If you want that effect, the only solution is to download a strikethrough font such as BTTypewrite. See my article: Strikethrough Font in Access
Otherwise use conditional formatting as already suggested.