Carriage returns in control source

I'm trying to format my control source in a report.  Currently I am using the 
format [field1] & " " & [field2] & " " & [field3] to concatenate data.  
Instead of adding a space between the fields, I want to add a carriage return 
and drop the next field to the next line and so on so that each 'field' is 
really on it's own line.  I don't want to make three separate text fields to 
accomplish this task because I need to have the retrieved data aligned 
equally with each other, and if [field2] is null, I want to have [field3] 
'move up' underneath [field1] as if it were now [field2].  I'm not sure this 
concept will even work because, if I understand the literal reference 
correctly, then there would still be two carriage returns causing the 
[field3] to still be too far underneath [field1].  If my thoughts are 
correct, any other suggestions as to how I can accomplish my task?

Hoping that can be accomplished, I then wish to vertically and horizontally 
center my data in the text box.  Centering horizontally can be done using the 
property sheet, but I can't find how to center vertically.

Any suggestions on these two issues?
Thanks!!
0
Utf
1/29/2008 2:49:07 AM
access.reports 4434 articles. 0 followers. Follow

1 Replies
1045 Views

Similar Articles

[PageSpeed] 40

Parabuck wrote:

>I'm trying to format my control source in a report.  Currently I am using the 
>format [field1] & " " & [field2] & " " & [field3] to concatenate data.  
>Instead of adding a space between the fields, I want to add a carriage return 
>and drop the next field to the next line and so on so that each 'field' is 
>really on it's own line.  I don't want to make three separate text fields to 
>accomplish this task because I need to have the retrieved data aligned 
>equally with each other, and if [field2] is null, I want to have [field3] 
>'move up' underneath [field1] as if it were now [field2].  I'm not sure this 
>concept will even work because, if I understand the literal reference 
>correctly, then there would still be two carriage returns causing the 
>[field3] to still be too far underneath [field1].  If my thoughts are 
>correct, any other suggestions as to how I can accomplish my task?
>
>Hoping that can be accomplished, I then wish to vertically and horizontally 
>center my data in the text box.  Centering horizontally can be done using the 
>property sheet, but I can't find how to center vertically.
>

Use Chr(13) & Chr(10) to get a new line.

Vertical centering is a problem.  See
http://www.lebans.com/verticaljustification.htm

-- 
Marsh
MVP [MS Access]
0
Marshall
1/29/2008 3:49:31 AM
Reply:

Similar Artilces:

Enter Key Jump controls
Hello. I have a Dialog and several Edit Box. when i press control Key my program stops. I'd like to press enter key and jump to the next edit box or another control. Any help?? >when i press control Key my program stops I am not sure why this is happening? You could add PreTranslateMessage(MSG* pMsg) to the Dialog Then change the keys, or move to some other control, or do whatever you want to do. I'm not sure if you have to do this to each control, or just the dialog in general. From experience, I would not change the default behavior, such as tab moves to the next control Whe...

Copy a currency value from one control to another
I have a text box (called ExtendedCost), that has a sum statement in it. I want to copy the value on the exit control event to another text box control (called WithdrawlAmount) on the same form and write the value into WithdrawlAmount box on the Enter Event for the control box, so people don't have to input the same number into the control box. Is there an easy way to do this? If it's the same calculated value, just use the same expression. Generally, don't store calculated values. Just perform the calculation as needed. If you need more help with this, describ...

Links error when insert line/row to source workbook
I have a question regarding links on Microsoft Excel 2003. If I insert a line into the source spreadsheet, the link on the destination spreadsheet doesn't work anymore because the cells moved. The scenario: On the destination spreadsheet, the link is =[ACME.xls]Sheet1'!A1 But if I insert a line on ACME.xls, making the info in cell A1 move down to A2, the link on the destination spreadsheet still pulls from cell A1. How do I ensure that when I insert/delete lines/row, the link still pulls info from the correct cell? Thanks Stella If you have the workbook with the fo...

How to transparent editbox control works correctly...
Hi i am working on an application where i have dialog based application. On dialog there is a picture control which displays a picture. Now i want to put an edit box. Text box string is current time which i am getting from OnTimer handler. i want that editbox control should be transparent except text in it. for this i have work with following code and get succeed in OnCtlHandler of dialog if(pWnd->GetDlgCtrlID() == IDC_EDT_Isha) { pDC->SetBkMode(TRANSPARENT); hbr = (HBRUSH)GetStockObject(NULL_BRUSH); } it makes the backgound tranparent but when the value of the edit box change...

vlookup from two sources
[Excel 2003] Is it possible to use syntax to perform a vlookup from a source and then another if the first is False? For example, My primary table of data is called "Materials" and my second source is a range A81:E140 on the same sheet as the vlookup, So something like : =vlookup(A1,Materials,2,vlookup(A1,A81:E140),2,False) Can anyone help with advice on syntax? Thankyou, Roger the false in a Vlookup is the mtach type, not an value to use if the formula is false. =if(iserror(vlookup(A1,Materials,2,false)),Vlookup(A1,A81:E140,2,false),Vlookup(A1,Mate...

Direct Debit posted control
Currently GP will assume once a customer is marked with bank account details the system will assume all invoices are taken by DD and the only time this can be amended is prior to posting to the ledger. The ability to amend a posted invoice to either be DD payment or remove the DD payment until the invoice is fully paid would be useful ...

Unbound OLE frame sourced to Excel range
I am trying to use an Excel file as a template for an Access report. To do this I have linked the excel file through an unbound OLE frame. The OLE frame is placed over the report detail area and data controls are placed over this at locations such that it fills the template form behind it. The properties of the frame related to the Excel area as, Source Doc : C:\sajit\test.xls Source Item : test1 where test1 is the range name in the Excel sheet. I also have other sheets which are used as templates for other reports. When I preview the report, Access picks the wrong template, even th...

blinking tabs in an owner drawn tab control
Hi all, I need to blink tab or atleast tab text in an owner drawn CTabCtrl derived Tabcontrol. Please guide me how to do it. Regards Shoeb Implement WM_TIMER (SetTimer/OnTimer...). In OnTimer message handler change something conserning what you want to blink (text- or bk-color or some font parameters or something else what makes sense for you) Victor "shoeb" wrote: > Hi all, > I need to blink tab or atleast tab text in an owner drawn > CTabCtrl derived Tabcontrol. Please guide me how to do it. > > Regards > Shoeb > &g...

Refering to control property on a form in VB
Hi I am trying to simply my code in a application by using a sub routine to amend the control properties of a form but I can't seem to get basic to accept the control property being sent to the routine as a string The code I am using is : Private Sub lSubControlPropertySet(stForm As String, stControl As String, stProperty As string, varValue As Variant) If IsNull(varValue) = True Then Forms(stForm)(stControl)(stProperty) = "" Else Forms(stForm)(stControl)(stProperty) = var...

How to add Upper/lower control limit lines to a graph (not drawn)
I have several quality charts that I do monthly. How can I get the the upper, lower and center lines to appear at a specific data point (number) as part of hte chart format. In other words, withiout having to use the Draw Line tool each time? Excel 2003. Fake it. In other words, seutp some "dummy" series that are calculated, and plot them on your chart. Format them to look however you like, and remove the original chart gridlines. If you have a legend, single-click twice the legend entry for your dummy series and press delete. If done correctly, the entry will not...

How to control graph area
Still running stone age version of excel (97). Att least in this version it is very difficult to control the size of the diagram area when you cetreate a graph with the diagram tool. This problem is dual. On the one hand there is no entry/input (that I can find) to specify an EXACT diagram area (in pixels, cm etc. On the other hand if you use the drawing to to create the exact borders of the desired area and then adjust the diagram (the coordinate system) acrodingly - the d' thing won't remain stable. Now is ther anyone out there how knows what to do. A hidden surface entry for...

Adding custom fields to dynamically created controls.
I created a custom Outlook (2003) form that imports data from Access to populate user defined fields and create additional controls based on the number of records in an Access query. Everything works fine except the data the user enters for the dynamically created controls don't hold their value when the form is sent. I am quessing that is because there is no user defined fields bound to them. (how do I do this) I have been looking on the net but cannot find anything close enough. Any help (examples) would be appreciated. Look at http://www.outlookcode.com/d/formcontrols.htm, lots of inf...

Bug: (MFC 7.1) Paste into CRichEditView copied from other RichEdit control
Recently, I was helping someone figure out a problem in an MFC application recently upgraded to VC 7.1 (MFC 7.1) from VC 6.0 (MFC 6.0). While running on Windows XP, if you copied text from another CRichEditCtrl, CRichEditView, or another application using RichEdit like WordPad or Word, pasting what you've copied into a CRichEditView would paste nothing. When googling to try to find clues, most of the time there was either no response to the question, or the work around was to change the "copy" end that you controlled, and only put CF_TEXT on the clipboard. However, it ...

Looking for control to browse files
Hi, I am pretty new to and unexperienced with access (2007 is the one I amworking with) I have made a database (of 1 table) to record registered mail and such. I have added a hyperlink field which contains the link to a specific transmittal document showing the contents of the mail item. I have added it to the form and it works fine. If I click on the link it opens the (Word) transmittal file). So far so good. What I want is a control that lets me browse for the transmittal file, something like a simple Open dialog Can someone point me to the right documentation, please ...

Set control AfterUpdate event to procedure in another module
Hi, i know i can set a controls AfterUpdate event to a user defined procedure if it is in the same module as the code, however is it possible to set it to a procedure in a different module? i.e. By setting in the OnFormLoad() event: cbo.AfterUpdate = "=Module1.Translate()" I cant get it to work, it just says "the expression you entered has a function name that microsoft office access cannot find". The Translate procedure is public. Any thoughts much appreciated. Thanks in advance, Chris If Module1 is a standard module (not a class module, and not the module of a form...

Statistical Process Control chart
Has anyone drawn SPC Chart in Microsoft Excel? Hi, Maybe have a look here http://peltiertech.com/Excel/Charts/statscharts.html http://www.processtrends.com/pg_charts_control_chart.htm Cheers Andy Tang Leep Boon wrote: > Has anyone drawn SPC Chart in Microsoft Excel? -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info ...

The message interface has returned an unknown error #2
When I try to enter an new event in my calendar I get this error message. I can't enter any new events. I have restarted Outlook many times and that does not fix the problem. I know there is a pretty easy way to fix this. Does anyone know what it is? Try closing Outlook and deleting/renaming the frmcache.dat and then reopen it and see if it helps. >-----Original Message----- >When I try to enter an new event in my calendar I get this error message. I can't enter any new events. I have restarted Outlook many times and that does not fix the problem. I know there is a pretty ...

CreateSalesOrder Web Service returning exception
When attempting to create a new Sales Order via the CreateSalesOrder web service in GP 9, I receive the following error: -------------- Begin Error ------------------------ A validation exception has occurred. Validation Errors: - The U of M for the item is not specified in the item price list as the default selling U of M. - U of M does not exist for the Unit of Measure Schedule being used. - PriceListKey is blank. It must be passed in or a default must exist for the transaction. -------------- End Error ------------------------ If I specify a Unit of Measure for each SalesOrderLine,...

Mouse/scrolling issue-Returns to the beginning of the document
Why is it doing it and how can I eliminate it? I am going to go nuts if I cant fix this A Laptop with a touchpad? It is usually an oversensitive touchpad. Try disabling the Touchpad to see if that eliminates the problem. If it does, go into the Touchpad settings and desensitise the pad or disable the 'click' feature. -- Terry Farrell - MSWord MVP "Brooksy" <Brooksy@discussions.microsoft.com> wrote in message news:C1424EEB-C5B5-4AFE-A127-C5F9B3BE03C9@microsoft.com... > Why is it doing it and how can I eliminate it? I am going to go nuts if I &g...

Source IP Address of Email
Can't figure out how to get the source IP address of the computer an email was sent from. The email was sent within the company, from an internal machine, so in the headers all I get is: .... X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Received: by mail.company.com id <01C57525.09352127@mail.company.com>; Thu, 17 Feb 2005 11:15:26 -0800 MIME-Version: 1.0 Content-Type: text/plain; .... And the message tracking tool in the system manager is no help either. Thanks. You can't. Internal e-mail typically does not contain header information. You also won't see it ...

Specifying source campaign in Opp., not counting as campaign respo
General usage question regarding campaigns. If we create a campaign, then specify that campaign as the source campaign for an opportunity, that opportunity/account is not then listed as a response to that campaign. So when we run a Campaign Performance report, no responses are listed. Do you have to use the normal method of entering a response within the campaign? I'd think that if you can associate a campaign within the opportunity, that linkage would reflect in a Campaign Performance report. Thanks!! ...

RegOpenKeyEx returns always ERROR_FILE_NOT_FOUND!
Hi folks, the following problem drives me crazy, I'm on the verge to go berserk! There is not much hair left to pull out at this stage! First of all a short code snippet: HKEY hCurrentRootKey = HKEY_LOCAL_MACHINE; HKEY hKey; CString strKey = _T("SOFTWARE\\Plath\\ReportingService\\Settings"); REGSAM samDesired = KEY_QUERY_VALUE; LONG lResult = RegOpenKeyEx(hCurrentRootKey, strKey.operator LPCTSTR(), 0, samDesired, &hKey); i...

Dragging to select multiple rows causes out of control scroll
When I select a number of rows by click and drag method, the rows scroll by too fast to control. Is there a way to slow down this scrolling? "ronlee67" <ronlee67@discussions.microsoft.com> wrote in message news:D2940A38-DDA3-4E4B-B41A-FCEFAA3ADACA@microsoft.com... > When I select a number of rows by click and drag method, the rows scroll > by > too fast to control. Is there a way to slow down this scrolling? Hi Roplee67, You can change the scroll speed of your mouse: Start | Control Panel | Mouse | Wheel | Scrolling Depending on your OS version, access to ...

RMS and Mfg Returns
How does everyone in RMS Land handle Returning Defective product to MFG? What do you do in RMS? Benjamin, Use the transfer out. Daniel Nurol Point of Sale and Barcoding www.nurol.com 404-352-3587 >-----Original Message----- >How does everyone in RMS Land handle Returning Defective >product to MFG? What do you do in RMS? >. > I've tried using transfer out, which seems to work fine on the RMS side, but we transfer from there over to QuickBooks at which time it becomes a bill. We took and deleted at that time and create a QB entry for RMS returns which then balances ...

Regional Options from control panel not displayed in Format Cells
Please can somone help me. I have searched on this topic but Alas I can not find an answer. So here is my question. When you set your number formats under control panel -> Regional options they are the ones EXCEL should use for formatting. My example is I want Parenthesis around my negative numbers ( ) . I do not want a - sign infront of number or it to be RED. So I have set my negative number symbol to () under the regional options. But if you start Excel and put in a negative number then goto Format cells -> numbers the option STILL show only a - or RED. I.E. it does not give...