Changing text based on criteria in an access report

Hello,

I've got a textbox in a report, some records of which may contain text 
within { }. I need to find some way to format only that text (which may 
be in the middle of a string) so that it appears underlined and so that 
the brackets disappear.

To illustrate, I posted a 5KB graphic here:
http://img219.imageshack.us/img219/3523/jexamplemb2.png

Does anybody have any suggestions or ideas?

Thanks in advance!

Mitch
0
Mitch
6/26/2007 11:25:51 PM
access.reports 4434 articles. 0 followers. Follow

2 Replies
1499 Views

Similar Articles

[PageSpeed] 13

Access 2007 can format the text for you, using standard HTML for the 
underlining. Use the Replace() function to swap the braces for the HTML 
tags.

Earlier versions of Access cannot display part of a text box differently 
than the rest. You could use a rich text control such as this one:
    http://www.lebans.com/richtext.htm

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Mitch" <mitch11278@yahoo.com> wrote in message
news:ukiRQlEuHHA.5028@TK2MSFTNGP02.phx.gbl...
> Hello,
>
> I've got a textbox in a report, some records of which may contain text 
> within { }. I need to find some way to format only that text (which may be 
> in the middle of a string) so that it appears underlined and so that the 
> brackets disappear.
>
> To illustrate, I posted a 5KB graphic here:
> http://img219.imageshack.us/img219/3523/jexamplemb2.png
>
> Does anybody have any suggestions or ideas?
>
> Thanks in advance!
>
> Mitch 

0
Allen
6/27/2007 11:03:49 AM
Mitch,

You might also try something similar to http://www.lebans.com/mixbold-plain.htm
- it would be a pretty ugly hack though. In Lebans' example, he
modifies the "boldness" of text before printing it. You could possibly
use the Line function to underline your text like so:

1. Break your string into tokens and place in an array. Underlined and
non-underlined tokens alternate throughout the array. Consider writing
your own Split() function to take care of both characters {} at the
same time (I have one if you would like it).
2. Modifying Lebans' example, print the first token.
    Record the X offset.
    Print the next token.
    Draw a line from the recorded offset to the .CurrentX using the
baseline of your text.
    Repeat.

-Kris

0
krissco
6/28/2007 2:42:52 AM
Reply:

Similar Artilces:

2 subreprots in a report
I have a report in which i have an existing subreport (sub1). The subreport (sub1) is in the report footer section of the main report. I need to add another subreport (sub2) to the main report. I triend adding it to the report footer section of the main report under sub1. However, i could not see the necessary data. I then tried adding sub2 to the report footer section of sub1 and i still cannot see the data. How can i have it so that i see the information in sub2 under that in sub 1 (which has its data under the main report data)? Thankyou, Radhika ...

adding values if the criteria in two columns are met
I need a formula to add values with two criteria in a column. I am trying to add the values if two criteria are met. For example below, I want to add the total of the amount that are for 2008 and has a Status of No. The answer would be $86,750. I could use the Pivot Table, but It's not what I want to use. Is there another way to do it with a formula? Amount Percent Year Status 75,000 3.00% 2008 No 6,750 3.00% 2008 No 9,100.00 2.00% 2009 Yes 620,000 2.00% 2009 No 2,800 2.00% 2009 No thank you, mayasmom Try this: =3DSUMPRODUCT(--(C2:C10=3...

Access can not find a table in append query
Hi all, I have a table called MyCustomers. For some reason, when I try to create Append query, it doesnt show on the list of tables. I know the the table is there and I can select it if I want to create a different type of query but not append. What can cause that? TIA, Tom Does your table have a PRIMARY KEY defined? -- Bob Larson Access World Forums Super Moderator Utter Access VIP Tutorials at http://www.btabdevelopment.com __________________________________ If my post was helpful to you, please rate the post. "Tom" wrote: > Hi all, > > I have a table call...

Cant make my report prefilterable
I created a report in VB.net and would like to make it prefilterbale. I did the steps reccomended changing the lead to CRMAF_filteredlead but it doesnt allow me to pre filter. Below is the SQL of my dataset for the report SELECT firstname, lastname, companyname, description, leadsourcecodename, owneridname, new_clientbusinesstypename, new_productname, subject, leadqualitycodename FROM dbo.FilteredLead ORDER BY companyname ------=_NextPart_0001_6673A6CF Content-Type: text/plain Content-Transfer-Encoding: 7bit <xxdcmast@discussions.microsoft.com>...

Query/Report Question
I am creating a construction diary database and I am having some difficulty calculating my number of working days, and would appreciate any insight into what I need to do. I have a fixed beginning date (notice to proceed date) that I have in a table related to other project information. In a data entry form I have a check box to be used if the work day will not be counted (noworkday). I know the formula for the will be working days = report date - beginning date + sum of noworkday. My report will be based on a date range, so how can get the sum of noworkday for each date of the repo...

converting "text" numbers to numbers
I have been using the technique of multiplying cells that have number entries that behave like text entries by the value of 1 to convert them to numbers. However, some mixed cell entries, convert strangely. For example the entry "6 A" (without the quotes) becomes 0.25 when multiplied by 1. Any explanation? Any ideas on how to solve other than checking cell by cell to confirm all characters are numbers? Confused! Frustated! <grin>. Bob Just figured out the "why". An entry like 6 A is converted to 6AM. Its numerical value is 0.25. Still hoping for a ...

Exporting reports
A report I have created is quite wide, and when I print or export it, it goes across two pages. Is there any way to set this to default to landscape, or at least ask me what orientation I want it in? Or even scale it so it fits onto the paper? Hi, I wrote an article about how to make reports. One of the items (look at the bottom) is about printing in landscape. See this url for the exact information: http://ronaldlemmen.blogspot.com/2006/09/reporting-prefilter.html -- Ronald Lemmen - MSCRM MVP Avanade Netherlands http://ronaldlemmen.blogspot.com/ "WiLLerZ" wrote: > A ...

access denied in CRM 1.2
Hey i have setup a new user and i am getting access denied. I hvae even put the user in all the groups just to see if it matters any ideas??? I am new at this crm... if i log into the server and type in my web address it works fine ...

Outlook HTML & Text Messages
I have my Outlook 2002 set-up to send and reply/forward messages using the HTML format. However, recipients (including me as a .cc) receive the e-mail in the TEXT format. The messages always appear correct when viewing them in the SENT folder. I have experimented with various selections to NO avail. Please advise what I am overlooking. Are you using an ISP or Exchange server for mail? If Exchange, check with the admin to see if the server is set to strip formatting. BTW, not all people want or appreciate HTML mail so you may want to rethink that strategy. I do not like it and ...

Change of system behaviour...
We have an Exchange 2003 in a Win 2003 domain... On Exchange we have installed GFI Mail Security 8... In the administrator account we used to get report e-mails which stated that the e-mail that was an attachment to the report e-mail didn't reach their recipient.So we had the e-mail the whole of it actually. Now, something has changed, someone has made a modification(??) and we only get the NDR and not the e-mail the original which didn't make it to the recipient! Any help would be much much appreciated. ...

Exchange 2010 Disclaimer HTML/Plain Text
I've been playing with the Exchange 2010 disclaimer feature I added some simple html <br> tags, <font size=small> and some active directory %%Company%% variables. I was curious what would happen if I sent a 'plain text' formatted email from outlook. What the recipient is seeing in this case is that it strips the html tags I added, but it ADDS following to the email...... <html> <body> DISCLAIMER TEXT </body> </html> Has anyone seen this? I was looking for a rule to possibly create separate HTML or Plain Text disclaimer...

Crystal Reports Session Timeout #2
Hi, we are running currently MS CRM together with Windows 2003, IIS6 and .net 1.1, everything works fine, except Crystal Enterprise. At this moment everyone can see the list of reports but just or Domain Administrator (the Acount which had installed CRM) can open reports, everyone else will get "Crystal Reports Session Timeout". We have tried all Service Packs and Hotfixes from Crystal, nothing changes. In the Eventlog we can see just one entry which shows that something is going wrong: Event Type: Failure Audit Event Source: Security Event Category: Logon/Logoff Event ID: 529 Date...

Duplexing GP Reports
I have a customer who wants to duplex their GP reports. The printer is set up for duplexing through the print queue but when printing from GP, the reports do not duplex. We have also tried selecting the Print Setup option of "print on both sides" but that also doesn't work. Has anyone been able to duplex documents/reports printed from GP? If so, how? Thanks for your help! We've had good success with duplexing and GP. It works really well for things like GL detail. Unfortunately we didn't do anything special. We picked print on both sides and it worked. Are you pr...

Converting month number to text equivalent
This is a multi-part message in MIME format. ------=_NextPart_000_000C_01C3D1EC.879C4B80 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable In cell A1 I have the date 01/06/2004 (Jan 6th, 2004) displayed. I want = to list the Month and Year of the previous month in cell B1. In this = example I need "DEC-2003" to display. Can anyone help? TIA, Alan ------=_NextPart_000_000C_01C3D1EC.879C4B80 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//...

Linked Text Boxes with Exact Objects copy/paste
Hello All, I am trying to change the layout of a 8.5" x 11" four page document to a two page 17" x 11" document. The four pager consist of four linked text boxes as pages with lots of graphics in each. When I rope the textbox plus the graphics, copy and then paste I only get the an empty textbox plus the graphics, the text is gone. I think this has something to do with the graphic objects Layout set to exact, but I would have to spend a few hours changing all of the objects to inline. Time is what I lack. Is there a way to do this. That is, copy and paste linked tex...

Access is Denied
I was wondering if anybody has encountered an Access is Denied message getting into Store Operations Manager while in POS is open. It's the strangest thing. We have 12 stores on this system and we have one store having this problem. She can still get into Operations Manager by pressing OK and bypassing the message, but then has difficulty with closing and reopening the POS (which, thanks to another posting I just saw here may fix that issue for her). I was just wondering if anyone had suggestions on how to get this message to go away? We've uninstalled and reinstalled the ...

Caption Criteria
Is it possible to set the caption property of a form based on criteria selected from several other forms? eg: from a Categories form, I click a cmd button to open a results form displaying records for the chosen category and set the results form caption to that category (this works ok for single caption criteria) as well as from a payees form, open the same results form and set the caption to the selected payee. In other words, set the caption to various other form criteria. Thanks in advance. -- Don, Sydney Australia You can programatically set the form's caption to whatever you ...

Exclude transfers from report
Hi all, I can't seem to get Money (2005) to ignore transfers from the reports it generates. I have a graph that shows account balance history over time, and it includes multiple accounts. When I transfer money from one account to another, there's a huge downward spike in the chart for that particular day. I have the transfers setup as "Special -> Transfer", as opposed to Expense -> Credit Card Payment / Transfer" (which I've deleted). Any suggestions how I can accommodate for this? The line chart looks awkward with these anomalies. Thanks, -G...

Problems with print preview and printing single page of multi-page report w/sub-reports
Hi All, I've come across a problem with previewing and printing reports in Access 2000 that I can't figure out, and hope someone can help. The problem report is set up with a page header, detail, and page footer. The information in the page header/footer sections is static. Within the detail are a group of controls, two of which are sub-reports. Of the two sub-reports, one in particular appears to be the problem (I'll call it SubA). SubA can shrink and grow and the controls in its detail can shrink/grow also. What I'm noticing is that sometimes the last line of text...

Access 2000 installation is failed
Dear all, I have installed Office 2000 for module Access and FrontPage, but got the following error : msiexec.exe has encountered a problem and needs to close. We are sorry for the inconvenience. Installer terminated prematurely. Installation ended prematurely because of an error. Is there any solution for this error ? Thanks. Chlaris ...

Please verify BUG in Microsoft Windows XP/2003 Accessibility *MPS*
Hello, The Problem (Multi Processor only): This occurs when there is MORE than one Logical/Physical CPU on the system. When a console winevent hook function is active, changing the codepage of a console window causes the console window to not respond. I set a hook using SetWinEventHook to get notified on events EVENT_CONSOLE_CARET to EVENT_CONSOLE_END_APPLICATION all is well, events are coming. When I open a CMD window and change the codepage to a different codepage than the default one, the window stops responding. From my tests it appears that the problem is somewhere in the SetCo...

Backup/restore a singel tab (sharepoint based tab on MS project 20
We have a PWA site that contains several tabs. The tabs are based on SharePoint 2007 templates. One of the tabs was created based on “Change request management” templates. I was wondering how can I get a backup from this tab and load it on different URL (different PWA site). We do not want to get a full backup of all the site, and we only need the information that we have on this particular tab and load/restore it on different URL. Please advice. Thank you. I have found a way to do that, so I post it here in case if anyone has the same issue: First with sdsadm get a ...

Automated Access Reports E-mailed with Outlook in Remote Desktop E
Automated Access 2007 Reports E-mailed with Outlook in Remote Desktop Environment (aka Terminal Services ) I have set up an Access 2007 application that automatically reads data from a SQL Server database, generates several reports, and then pushes these reports out to several files in PDF format. After the report files are generated, I use VBA code in Access to fire up Outlook to e-mail the reports as attachments to several department managers. This system is initiated by the Windows Scheduler at 4:00 AM every day and is run with no human intervention. In order to avoid th...

Cannot access mailboxes with OWA
I installed Outlook web access on a windows 2000 member server, Exchange 5.5 resides in a NT 4 member server box. This is a NT 4 Domain no active directory. When I try to log in it pops the user name and password right back. I look at the event log on the OWA server and it tells me that it is the wrong user name and password which is not true. I have adjusted the local policy for users to log on locally but that has not worked. Any ideas or direction would be greatly appreciated. Thanks >-----Original Message----- >I installed Outlook web access on a windows 2000 member server, Ex...

Accessing Session Cache from GenericPrincipal.isInRole() Options
Hi, Can someone please confirm that Session Cache will not always be available/accesible from an implemented/overriden IPrincipal.isInRole() method? We obtain the current session state via ((HttpApplication)sender).Session but *sometimes* get the error "Session state is not available in this context". What appears to be happening is when isInRole() is invoked to check for sitemap node access then Session State is available, but if the check is to do with a web-page url then it is not. Eg: - Web.sitemap <siteMapNode roles="ROLE1,ROLE2,ROLE3&qu...