Answer to Question #37820 in Visual Basic for K GIRIDHAR RAO

Question #37820
Dear Sir,

My Question from v.b 6.0 is

i am using a table "marks" which have fields like roll_no,name,marks and i wanted to create report which should show namelist in bold letters who ever scored morethat 80 and underline whoever scored below 40 and all others in regular font.

problem is how to make data report text box bold or underline or regular for certain records based on the marks and where to give coding for the condition criteria.

Kindly answer

Thanks

With Regards.
K.Giridhar Rao"
1
Expert's answer
2013-12-18T08:07:02-0500
The TextBox control in VB 6 has properties that can be manipulated with your code. The accessible font-related properties are listed below:
FontBold
FontItalic
FontName
FontSize
FontStrikethrough
FontUnderline

For example, if you need to make the textbox named myTextbox bold, the code would be like this:
myTextbox.FontBold = True
You can access DataReport controls via its controls collection properties like this:
DataReport1.Sections("Section2").Controls(“myTextbox”).FontBold = True
Please note that change would affect whole text in the Textbox. If part of text need to be changed, the RichTextBox should be used.
If you need more information about TextBox object, including full methods list, properties and events , please follow the link:
https://msdn.microsoft.com/en-us/library/19z8k5by(v=vs.90).aspx

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS