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

Report control is hidden after changing format

Status
Not open for further replies.

lizray

Programmer
May 14, 2008
126
AU
I Have an unbound control that I fill with a sring (using Lebans "lady.mdb" as an example, because I want to show different formats in the string) in the Print Detail event of the report. It works well until I include a background graphic on the report. The control is then covered by the graphic. I have tried "bring to front" for the control, and "send to back" for the graphic, but it makes no diff. Is there a property of the control I need to set??
 
I should mention that the Graphic is not included as the "Background Picture"(If I set it as the background picture, then the text in the control is visible ) but there is another graphic upon which I need to show the text in the control. It is this picture that "hides" the text in the control
 
Much of Lebans stuff is OBE, especially if you are using 2007 or later. They were usually API solutions for A97 and prior and now these things can be done natively. Can you describe what exactly you are trying to do?
 
What Lebans did not have at that time was a rich text box (2007 later) which may be your workaround. However this only works with a memo field. But you can add a memo field to your table and run an update query to populate. Then run the code you need to format. You can add all kinds of formatting.

MajPLady
IMG
 
I am running on Access 2003 and want to print a report which is based on an image of certificate. I want to print names etc, with different formatting in the same text box, on this certificate
 
Majp, thanks for comments, but unless you have any further suggestion, I can make it work by setting the image to be the report background, and then the text boxes are visible. One last question..How can the text be aligned to centre ??. I have set the textbox alignement to centre, but filling the textbox via the print detail event doesnt seem to take any notice of this.
 
You might be able to reset the alignment property in the print event. If that does not work than pad the string.
1)Figure out the length of the textbox
2)Figure out the length of the string
3)Based on the selected font determine the pad length, X. You will have to play with this and come up with some conversion constants.
4)pad the front of the string with X blank spaces.
 
Thanks for all your comments,they have helped to solve prob. I managed to centre text, by using the ".textwidth" to calculate space needed for txt and then subract this from the controls width and then divide by 2 to get the offset from the start of the control...it works well
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top