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

Strike through text

Status
Not open for further replies.

Oliver2003

Technical User
Apr 19, 2003
144
GB
Is it possible to change the text in a text box to strike through text by clicking on a command button? What sort of code would this require?

Cheers
 
This may not be the answer you want, but it would need a strike-though font - Access per se does not support that effect in a format, unlike Cell Formatting in Excel or Character styles in Word.

If you do have access to a native Strike-through font, you change the font style at run time like this:

Me.txtTextBoxname.FontName = "Bodoni Bold StrikeThru" or whatever your strikethrough font name is. Plus, you have to make sure that any PC that uses your system has that font installed..ugly, very ugly...

The only other possibility is to use a very thin line control, normally invisible, that you make visible when you want - making sure the BACKGROUND of the control is Transparent - and ajusting it's width to the length of the text in the control.


Jim




If at first you don't succeed, skydiving probably isn't for you!
Another free Access forum:
More Access stuff at
 
Cheers for the reply Jim, I'll give your ideas a try - I agree using a strike through font could be ugly!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top