473,799 Members | 3,210 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with Trim command

For some reason this command will not trim the names shown in the
fields listed. I'm trying to do this in a text box on a report. I've
done this fairly succesfully in other reports but I must have done
something wrong here....
I've tried both of these...

=Trim([QGPL_BADGE1.OML NAM] & [QGPL_BADGE1.OMF NAM])
=Trim([QGPL_BADGE1.OML NAM] &", "& [QGPL_BADGE1.OMF NAM])

The fields are 25 character text fields.
Any ideas?

Nov 18 '05 #1
3 2750
By your description, I'm assuming that when your textbox is displayed
it is coming out like Smith, John? What the Trim function is
going to do in your example is that it's going to put the last name and
first name together first and then trim it. What you need to do is
Trim both the LastName and FirstName so it looks like this:

=Trim([QGPL_BADGE1.OML NAM]) & Trim([QGPL_BADGE1.OMF NAM])

Try that.

FlyerN87 wrote:
For some reason this command will not trim the names shown in the
fields listed. I'm trying to do this in a text box on a report. I've
done this fairly succesfully in other reports but I must have done
something wrong here....
I've tried both of these...

=Trim([QGPL_BADGE1.OML NAM] & [QGPL_BADGE1.OMF NAM])
=Trim([QGPL_BADGE1.OML NAM] &", "& [QGPL_BADGE1.OMF NAM])

The fields are 25 character text fields.
Any ideas?


Nov 18 '05 #2
Thanks, That did the trick!

Nov 18 '05 #3
Uh - I assume there should still be -one- space between the names...

=Trim([QGPL_BADGE1.OML NAM]) & ' ' & Trim([QGPL_BADGE1.OMF NAM])

By the way, who chose those field names? They're abominable.

On 18 Nov 2005 07:53:28 -0800, jl*******@hotma il.com wrote:
By your description, I'm assuming that when your textbox is displayed
it is coming out like Smith, John? What the Trim function is
going to do in your example is that it's going to put the last name and
first name together first and then trim it. What you need to do is
Trim both the LastName and FirstName so it looks like this:

=Trim([QGPL_BADGE1.OML NAM]) & Trim([QGPL_BADGE1.OMF NAM])

Try that.

FlyerN87 wrote:
For some reason this command will not trim the names shown in the
fields listed. I'm trying to do this in a text box on a report. I've
done this fairly succesfully in other reports but I must have done
something wrong here....
I've tried both of these...

=Trim([QGPL_BADGE1.OML NAM] & [QGPL_BADGE1.OMF NAM])
=Trim([QGPL_BADGE1.OML NAM] &", "& [QGPL_BADGE1.OMF NAM])

The fields are 25 character text fields.
Any ideas?


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2492
by: Ronin | last post by:
Hi i am using following code which extracts information from XML file and creates an instance of class which it adds to hash table. problem is i am unable to extract information from hashtable : here is the piece of code public void readEmailRecords() XmlTextReader reader = new XmlTextReader("C:\\Mailer\\EmailRec.xml") reader.MoveToElement(); try
1
3554
by: Thanks | last post by:
I have a routine that is called on Page_Init. It retrieves folder records from a database which I display as Link Buttons in a table cell. I set the table cell's bgcolor to a default color (say black for example). I am dynamically creating the LinkButton controls and adding them into the table cell and I've also hooked up an event handler for each LinkButton's Click event. This all works fine. Now in the Link Button's Click event...
7
7015
by: WALDO | last post by:
I wrote a console application that basically consumes arguments and starts other command line apps via System.Process. Let's call it XCompile for now. I wrote a Visual basic add-in that does pretty much the same thing to XCompile. Let's call it MyAddin. XCompile collects information to send to vbc.exe. When it comes across any arguments that are file paths, it wraps them in quotes. For example: Dim prms As String
4
1967
by: comp.lang.tcl | last post by:
I wrote this PHP function in the hopes that it would properly use a TCL proc I wrote about 4 years ago: if (!function_exists('proper_case')) { /** * Ths function will convert a string into a proper case format using the customized TCL proc "PROPER_CASE" from the included TCL string tools libraries * * @access public
0
1126
by: paulhux174 | last post by:
Hi, I've a dataGrid set up (the standard msdn example) with a SqlDataAdapter, and DataSet. The problem is that after inserting a new row using the LinkButton1_Click() (code below) then edit the values I then try to update the values using "DataGrid1_UpdateCommand()" The FindByApplID does't find the row. It looks like the 'DataSet12.Appl.Rows.InsertAt(dr, 0)' doesn't insert.
0
1303
by: aj123 | last post by:
I have Table News NewsID, int NewsHeadLint, varcahr(200) OrderNews, int I gridView Display as following query Select ID,NewsHeadLine from News order By OrderNews DESC ---- <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="NewsID" EmptyDataText="There are no data records to display." DataSourceID="SqlDataSource1" Style="position: relative; left: 4px; top: 44px;"...
8
18830
by: jonosborne | last post by:
Hi, Im sure the TRIM function works fine, otherwise there would be thousands of people worldwide kicking up a right fuss. But for some reason it is not returning the desired result. I have a table with names, the majority are 6 characters long the rest are 5 characters. This data has been copied from a seperate program into excel and the excel file is linked to the access database. This database is then, on a daily basis, appended into an...
3
2088
by: helraizer1 | last post by:
Hey folks, yet again. if ($back == "m") //$back is a value pulled from a db; that works perfectly. { $wid = $rowing; $hei = $rowing; createthumb("660x240background2.gif", "./user/" . $user . "_back.gif", $wid, $hei);
23
3603
by: ryna | last post by:
Desperately need help.... here's the snippet of my code that im trying to solve since last week... icePayment.aspx If (Left(Request.Form("return_url"), 7) <> "http://") Then errorInput = errorInput & "Invalid return URL path! <BR>" errorExist = True Response.Redirect("InvalidUrlError.aspx")
0
9688
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9546
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10490
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10260
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7570
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4146
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.