f



Remove extraneous text in a text box

I get text in a text box that looks like this:

Hello
On computer COMPNAME the following happened:
New File: C:\Folder1\Folder2\LockBox\Usr\ClientName\FileName.xls
7/25/2011 1:25:10 PM

How do I remove everything except the folder path and file name?  It's
too much for me.
0
lhowey (118)
7/25/2011 10:00:41 PM
comp.databases.ms-access 42670 articles. 0 followers. Post Follow

5 Replies
869 Views

Similar Articles

[PageSpeed] 14

C:\Folder1\Folder2\LockBox\Usr\ClientName\ = Foldername
FileName.xls = Filename

Bjarne



"musicloverlch"  skrev i meddelelsen 
news:3b273dd8-e1c7-43e9-84dc-2b9aee46ded6@e40g2000yqn.googlegroups.com...

I get text in a text box that looks like this:

Hello
On computer COMPNAME the following happened:
New File: C:\Folder1\Folder2\LockBox\Usr\ClientName\FileName.xls
7/25/2011 1:25:10 PM

How do I remove everything except the folder path and file name?  It's
too much for me. 

0
bsn
7/25/2011 11:24:33 PM
The text must come from some VBA coding...
Checkout VBA module for the form where the text box belongs, and search for 
the text...
Correct the VBA code to what u need...(Folder and FileName)
Bjarne


"bsn"  skrev i meddelelsen 
news:4e2dfb3d$0$56791$edfadb0f@dtext02.news.tele.dk...

C:\Folder1\Folder2\LockBox\Usr\ClientName\ = Foldername
FileName.xls = Filename

Bjarne



"musicloverlch"  skrev i meddelelsen
news:3b273dd8-e1c7-43e9-84dc-2b9aee46ded6@e40g2000yqn.googlegroups.com...

I get text in a text box that looks like this:

Hello
On computer COMPNAME the following happened:
New File: C:\Folder1\Folder2\LockBox\Usr\ClientName\FileName.xls
7/25/2011 1:25:10 PM

How do I remove everything except the folder path and file name?  It's
too much for me. 

0
bsn
7/26/2011 12:06:35 AM
"musicloverlch" <lhowey@gmail.com> wrote

 >I get text in a text box that looks like this:
 >
 > Hello
 > On computer COMPNAME the following happened:
 > New File: C:\Folder1\Folder2\LockBox\Usr\ClientName\FileName.xls
 > 7/25/2011 1:25:10 PM
 >
 > How do I remove everything except the folder
 > path and file name?  It's too much for me.

What do you mean "I get text in a text box" -- does the Text Box have a 
Control Source that binds it to a Field or is it set some other way?  Does 
the text have line breaks where you show them, or are you just breaking the 
lines arbitrarily for usability?  If it has line breaks, what is the ASCII 
code of the characters make up the line break -- MS Office uses the 
character represented by the builtin Constant vbCrLF for which the ASCII is 
CHR(10) & CHR(13). Some other definitions of text files only use the 
Carriage Return, CHR(10) for a line break.

Assuming there are line breaks, and they are vbCrLf values, then the 
following will illustrate how to process the text string to extract the path 
and file.  The first Function, FeedPAndF, just creates the string for use as 
test date by the second Function, ExtrPAndF.  Paste these into a standard 
Module, then execute from the Immediate Window by typing in ? FeedPAndF(). 
I've used Debug.Print to print each step so you can follow what it's doing.

Function FeedPAndF() As String

    Dim strBuilt As String

    strBuilt = "Hello" & vbCrLf & "On computer COMPNAME the following 
happened:" & vbCrLf
    strBuilt = strBuilt & "New File: 
C:\Folder1\Folder2\LockBox\Usr\ClientName\FileName.xls" & vbCrLf
    strBuilt = strBuilt & "7/25/2011 1:25:10 PM"

    Debug.Print strBuilt

    ExtrPAndF (strBuilt)

End Function

Function ExtrPAndF(strInput As String) As String

    Dim lngStartPos As Long
    Dim lngStopPos As Long
    Dim lngLenPAndF As Long
    Dim strPathAndFile As String

    lngStartPos = InStr(strInput, ":\") - 1
    lngStopPos = InStr(lngStartPos, strInput, ".")
    lngLenPAndF = lngStopPos - lngStartPos + 4

    Debug.Print lngStartPos
    Debug.Print Mid(strInput, lngStartPos, 3)
    Debug.Print lngStopPos
    Debug.Print Mid(strInput, lngStopPos, 4)
    Debug.Print lngLenPAndF

    strPathAndFile = Mid(strInput, lngStartPos, lngLenPAndF)
    Debug.Print strPathAndFile

    ExtrPAndF = strPathAndFile

End Function

Once you understand what it's doing, you could combine the parts of the 
extracion into one expression, but that would not be as easy to follow, 
especially if you have to come back to it after some period of time to 
maintain the code.  You wouldn't need, or want, the Debug.Print to take 
place in production, but it'd be best just to place a single quote ' on the 
left of those lines, just in case you need to re-activate them in the 
future.

-- 
 Larry Linson, Microsoft Office Access MVP
 Co-author: "Microsoft Access Small Business Solutions", published by Wiley
 Access newsgroup support is alive and well in USENET 
comp.databases.ms-access



0
accdevel (436)
7/26/2011 4:31:51 AM
On Jul 25, 5:00=A0pm, musicloverlch <lho...@gmail.com> wrote:
> I get text in a text box that looks like this:
>
> Hello
> On computer COMPNAME the following happened:
> New File: C:\Folder1\Folder2\LockBox\Usr\ClientName\FileName.xls
> 7/25/2011 1:25:10 PM
>
> How do I remove everything except the folder path and file name? =A0It's
> too much for me.

As others noted, there's some code producing the message.  The
timedate stamp most likely comes from the function FileDateTime()
Look for FileDateTime or "Hello" or "New File:" in your code modules.
Adjust to suit.
0
7/26/2011 2:23:21 PM
Sorry, this is an ODBC connection to Outlook. I don't contol the
text.  I was able to remove the extraneous text using InStr and
Replace functions.

Thanks so much for all your suggestions.


On Jul 26, 9:23=A0am, Patrick Finucane <patrickfinucan...@gmail.com>
wrote:
> On Jul 25, 5:00=A0pm, musicloverlch <lho...@gmail.com> wrote:
>
> > I get text in a text box that looks like this:
>
> > Hello
> > On computer COMPNAME the following happened:
> > New File: C:\Folder1\Folder2\LockBox\Usr\ClientName\FileName.xls
> > 7/25/2011 1:25:10 PM
>
> > How do I remove everything except the folder path and file name? =A0It'=
s
> > too much for me.
>
> As others noted, there's some code producing the message. =A0The
> timedate stamp most likely comes from the function FileDateTime()
> Look for FileDateTime or "Hello" or "New File:" in your code modules.
> Adjust to suit.

0
lhowey (118)
7/26/2011 4:50:14 PM
Reply:

Similar Artilces:

Unbound text box, text>255, MS Access/PostgreSQL
Hello. I have the following problem with MS Access/PostgreSQL combination: There is a form in Access that has an unbound text box, used for entering a commentary of a batch of records. There is a DAO Append Query that has a parameter that is passed from the text box using parameter of DAO QueryDef object. I adjusted B7 parameter (Text as LongVarchar) in connection string (ODBC driver) to 1, so that Access links PostgreSQL Text fields as Memo fields in Access. The intention was to be able to enter unlimited length commentary into the field. But, although I can enter unlimited text by using...

Text from required text box to read-only text box
Hello, I am fairly new to JavaScript and its use in Acrobat Professional. My situation is this: I have a form with a text box field which is required for the user to enter his/her name. I would like the required text box to display the name in all caps. I also need the user's name to appear in a read-only text box later in the form, which I would like to have the first letter of the user's first, middle initial, and last names to be capitalized. I would also like to have all required fields on the form highlighted in yellow, but the highlighting not printed. Lastly, I would like the...

text + text
What is "text + text" supposed to do right now? It doesn't seem very useful to me. What about making "text + text" as an equivalent for "text || text"? Most strongly-typed programming languages do this. And MS SQL Server too, I think (CMIIW). -- dave ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org Am Freitag, 8. Oktober 2004 12:57 schrieb David Garamond: > What is "text + text" supposed to do right now? Nothing. > What about making "text + text" as an equivalent for "text > || text"? Most strongly-typed programming languages do this. And MS SQL > Server too, I think (CMIIW). What would this gain except for bloat? It's not like SQL is utterly compatible with any programming language; users will still have to learn all the operators anyway. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match Peter Eisentraut wrote: >>What is "text + text" supposed to do right now? > > Nothing. Then are these bugs? (7.4.5 and 8.0.0beta1 give same results). Frankly, the current behaviour is quite strange to me. ------------------ =...

text-text
Wondering how what I input to my UTF-8 terminal gets passed along through my patched [1] trn ... Cyrillic: А Б В Г Д Е Ж З И Й К Л М Н О П а б в г д е ж з и й к л м н о п IPA: ᴀ ᴁ ᴂ ᴃ ᴄ ᴅ ᴆ ᴇ ᴈ ᴉ ᴊ ᴋ ᴌ ᴍ ᴎ ᴏ ɀ Ɂ ɂ Ƀ Ʉ Ʌ Ɇ ɇ Ɉ ɉ Ɋ ɋ Ɍ ɍ Ɏ ɏ [1] https://groups.google.com/d/msg/comp.sys.raspberry-pi/7Z37Hdrm0DM/6aqD-reXFzAJ ...

Show Text box on Top of another Text Box
Hi, I have a text box with conditional formating so if certain conditions are m= et it display either Green or Red. I want to put another text box on top of= it (this text box is smaller than the "conditional formating" text box) an= d have the the text in this text box displayed. Basically I want the condit= ional text box to form a colour border around the displayed text. How do I do that? Thanks, Barry On Apr 1, 11:18=A0am, Barry Edmund Wright <barry.edmund.wri...@witstoronto.ca> wrote: > Hi, > > I have a text box with conditional formating so if certain conditions are= met it display either Green or Red. I want to put another text box on top = of it (this text box is smaller than the "conditional formating" text box) = and have the the text in this text box displayed. Basically I want the cond= itional text box to form a colour border around the displayed text. > > How do I do that? > > Thanks, > Barry Why not overlay the textbox and set Visible =3D False. Then when true change to Visible =3D True. Barry Edmund Wright <barry.edmund.wright@witstoronto.ca> wrote in news:21224033.2400.1333297115162.JavaMail.geo-discussion-forums@vbbdy 9: > Hi, > > I have a text box with conditional formating so if certain > conditions are met it display either Green or Red. I want to put > another text box on top of it (this text box is smaller than the > "conditional formating" text box) and hav...

Highlighy text in Text Box
Using an InputBox, there is the option to *suggest* text (Default). It appears highlighted and can be accepted or replaced by the user. I am attempting to create my own input form which has one Text Box, one command button (cmdAccept ) and a simple label to tell the user to make an entry. What I cannot do is to mimic that suggested default input string. Can someone show me how to do it? The following code is from a test program with two forms. '#### this is on FrmMain Private Sub Option1_Click() ' Other Event selected - 14 character maximum With FrmBGOther ...

How to import a tab delimited text file into MS Access database
Hi, I have the following task to be done in VC++ 6.0. I have a tab delimited text file that needs to be imported into a MS Access table. The table is created and the table structure is defined using DAO methods. So now I have to fill this table with the data in the text files. For a few rows in the text file, the number of columns could be less than the number of columns in the table. Can anyone please post me the code to do this. Thanks a ton in advance. Pradeep wrote: > I have the following task to be done in VC++ 6.0. We'd be happy to give you the VBA code, but do you really want ...

Get the real type of columns from MS Access databases(OLEObject, text, memo, numeric)
Hello, I made one application that opens MS Access databases.And I have one problem.How can I find the real data type of columns(text, memo, OLEObject, numeric) like it is into Access.I tried with resultSetMetaData.getColumnType(columnIndex) but I receive java.sql.Types.I have two columns that contains OLEObjects(images).But I receive two different types for columns : VARCHAR once, and for second column SMALLINT.I only want to see the types like in Access(OLEObjects, Text, Numeric, Memo...).Thanks in advance! Best regards, Calin Pop ...

Different text styles in the same text box
I am developing a bibliographic database. I am creating a report with bibliographic references like this: - Joyce, Ulysses, London, Penguin Press, 2002. The last string has been obtained by an expression like this: [author] & [text] & [city] & [publisher] & [date] Now there's a problem. I'd like to get different styles for the different fields (ex: italics for the author, underlined for the book title, etc). Is it possible? Thanks in advance Davide If I'm not mistaken there is a rich-text control that comes with VB that would allow you to do this, but I don't t...

Deselecting text in input text box
I have a text input box and I don't want the text to be selected either when the user tabs to the item or if the user clicks on it. Now the function below which I found from 2002 in the archive works fine for IE 6 but it works in neither Netscape 7 nor Firefox 1.0. I'm hoping some of you might have an alternative suggestion or insight for Netscape and Firefox. Code that works in IE6: function clearSelection () { if (document.selection) document.selection.empty(); else if (window.getSelection) window.getSelection().removeAllRanges(); } <input type="text" name=...

Highlight text and Text Box Control
C5.0b PE legacy Hello! I have one invoice application with the text area for variable customer announcement. It is now filled and printed using the standard Arial characters. Is there any easy and cheap method to highlight these messages? (Compare "Word text") TIA Riku Maki ...

Displaying text in a text box depending on selection made in list box on same form
Hi I have an unbound text box on a form from which the user can choose a product. When the user chooses a product, I want the text box on the same form to display the description of that product. right now I can get it to display the row number of the product that corresponds to what the user clicked but not the value of the Product Description which is what I want. The fields in the tables are both text. here is the code: Private Sub LstContactProducts_AfterUpdate() txtProductDescription.SetFocus txtProductDescription.Text = LstContactProducts.Column(2,txtProductDescription) End Sub Thanks in advance Colin Colin, why don't you create the combobox, with from a table or query with all the information you need and use cboComboboxname.column(0), cboComboboxname.colum(1) etc etc...to populate the fields you want? HTH Michael "Colin Ward" <cward002@sympatico.ca> wrote in message news:2a660c80.0308010710.26b3257@posting.google.com... > Hi I have an unbound text box on a form from which the user can choose > a product. When the user chooses a product, I want the text box on the > same form to display the description of that product. right now I can > get it to display the row number of the product that corresponds to > what the user clicked but not the value of the Product Description > which is what I want. The fields in the tables are both text. > > here is the code: > > Private Sub LstContactProducts_AfterUpdate() > txtP...

Box of text with width of another text
Hi, how can I make a box that contains one string, but has the width of another? For example, is there a command like \widthoffirstboxbox{$T$}{$T_a$} which creates a box which contains $T_a$ but has the width of $T$? Best regars, Paul Paul Kaletta <paulkaletta@googlemail.com> wrote: > Hi, > > how can I make a box that contains one string, but has the width of > another? > > For example, is there a command like > > \widthoffirstboxbox{$T$}{$T_a$} > > which creates a box which contains $T_a$ but has the width of $T$? \usepackage{calc} \makebox[\widthof{$T$}]{$T_a$} Ciao Enrico Paul Kaletta <paulkaletta@googlemail.com> writes: > Hi, > > how can I make a box that contains one string, but has the width of > another? > > For example, is there a command like > > \widthoffirstboxbox{$T$}{$T_a$} > > which creates a box which contains $T_a$ but has the width of $T$? \llap{$T_a$}\phantom{$T$} -- Change “LookInSig” to “tcalveu” to answer by mail. Paul Kaletta <paulkaletta@googlemail.com> writes: > Hi, > > how can I make a box that contains one string, but has the width of > another? > > For example, is there a command like > > \widthoffirstboxbox{$T$}{$T_a$} > > which creates a box which contains $T_a$ but has the width of $T$? \rlap{$T_a$}\hphantom{$T$} -- Change “LookInSig” to “tcalveu” to answer by mail. ...

How to get text in text box to wrap?
The variable {job-name} in this code snippet does NOT wrap, resulting in the text running off the page. How would I get job-name to word wrap? pageWidth 36 mul % x = pageWidth * 1/2 * 72 pageHeight 36 mul % y = pageHeight * 1/2 * 72 pageHeight 2 mul add % y += 1 line 2 copy % Copy X & Y moveto (Title: ) RIGHT moveto ({job-name}) show This postscript file is from the CUPS printing application on a Linux system. Here is the complete file: FILE: /usr/share/cups/banners/standard %!PS-Adobe-3.0 %%BoundingBox: 0 0 612 792 %%Pages: 1 %%LanguageLevel: 1 %%DocumentData: Clean7Bit %%DocumentSuppliedResources: procset bannerprint/1.0 %%DocumentNeededResources: font Helvetica Helvetica-Bold Times-Roman %%Creator: Michael Sweet, Easy Software Products %%CreationDate: May 10, 2000 %%Title: Test Page %%EndComments %%BeginProlog %%BeginResource procset bannerprint 1.1 0 % % PostScript banner page for the Common UNIX Printing System ("CUPS"). % % Copyright 1993-2005 Easy Software Products % % These coded instructions, statements, and computer programs are the % property of Easy Software Products and are protected by Federal % copyright law. Distribution and use rights are outlined in the file % "LICENSE.txt" which should have been included with this file. If this % file is missing or damaged please contact Easy Software Products % at: % % Attn: CUPS Licensing Information % Easy Software Products % 44141 Airport View Drive...

Save Text from GUI Edit Text Box
Hi there! I'm very new to MatLab, this is probably very easy to do - please, if you can, give me very explicit instructions. I'm creating a GUI in GUIDE that has a editable text box. I want a button that, when clicked, will write that text to a text file (in this case, directory.txt). If there is a way to browse for a directory and input the directory into the text box in the GUI, that would be way awesome, but it's not a priority. Thanks very much everybody! "Kyle " <kylebshr@gmail.com> wrote in message <jucb5d$s0b$1@newscl01ah.mathworks.com>... ...

How do I 'SELECT All' text in a text box
I want to select all text in a multi line text box from a command butten. Thank for help Dave Try this... Private Sub Command1_Click() With Text1 .SelStart = 0 .SelLength = Len(.Text) .SetFocus End With End Sub Rick - MVP "Dave" <last2try@earthlink.net> wrote in message news:fo0b90h0j9imbvntdea3uu2mefth5teufr@4ax.com... > I want to select all text in a multi line text box from a command > butten. > > Thank for help > Dave ...

Wrapping Text
I'm trying to export an Access table to a pipe-delimited text file (with no text qualifier) and it keeps wrapping the text for one of the tables. None of the fields are particularly long, so I'm not sure why it's doing this. Any ideas how I can stop it from wrapping the text in the text file? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-access/200803/1 Leviathan wrote: >I'm trying to export an Access table to a pipe-delimited text file (with no >text qualifier) and it keeps wrapping the text for one of the tables. N...

Old ms-access file, showing wrong text in access xp
Dear sirs: I've one old .mdb file ( since 97). now when I open it, it converts most of text to strange unicode characters. can I stop this conversion and ask access to just show original non-unicode characters? Thanks Bijan ...

R ePassing text from text box to sql
Thanks To Pieter and Iago for your help Regards Boris ...

passing text fom text box to sql
Hi I hope someone can help me simplified scenario The situation: microsoft access 2000 TABLE is a list of surnames SQL query is SELECT surname FROM table WHERE surname =("SomeSurname") FORM has a buttons and a text box I want to be able to type "SomeSurname" into Text Box and then click button to run SQL query with SomeSurname and open results in a datasheet sheet View I try as i may I can not do thisI have tried DoCmd OpenQuery DoCmd.RunSQL ect any help appreciated Boris, AIR CODE ALERT I assume tboxSurname and btnSearch exist on some form. The form also has a su...

Add new text box after entered text
Hello, I have an application that I'm building but I'm getting stuck on a few things. 1. I have a slider to select how many "sections" to have, this will then build a table of text boxes for a title in one column, and in the other column there will be 2 text boxes for an "option name" and "value". (I got this part) 2. When someone finishes entering the title, and one option/value then clicks off of the last box I want to create a new one for that option. If they don't enter a value for both I don't want it to show another group of text boxes. Ques...

I have a Text control string box with some initial text. I...
I have a Text control string box with some initial text. I would like to highlight old text with click of mouse and type in new data from keyboard I have a text control string box with some initial text (says: Please enter Name). I would like the operator to click on the text control box and have it automatically highlight so that when new data is typed in the old erases (all at once) and the new data is now in the text box. I tried using the "Text.Selection" property node and when I run it and put the mouse inside the text box the initial text is highlighted and if I press "de...

Re: How can labview update the string control (text-edit box) after we have pressed the carriage return key on the keyboard during text-editing within that box?
Hello Alberto, &nbsp; I have trouble to edit an exited text file and save it after the content changed. Can you please&nbsp;help me out? &nbsp; Thanks, Jason&nbsp; ...

ADP text box issue: Backspace deletes ALL text.
OK, I have never noticed this before, but I'm getting a consistent issue with text boxes on my Access form in an ADP with data in SQL Server. 1) Click in a text box with text 2) Cursor is flashing at end of text 3) Press Backspace key 4) ALL text is deleted 5) Press ESC key to undo delete 6) All text is now selected 7) Click again at end of text 8) Press Backspace key 9) Text deletes one character at a time There is no code behind the text box or elsewhere that forces its behavior. Same behavior happens when I add a new text box with a new name that points to the same field. (I...

Web resources about - Remove extraneous text in a text box - comp.databases.ms-access

Extraneous Lyrics 2012 - YouTube
The 2012 edition of Extraneous Lyrics, where some of the year's most popular songs are given a wordier acoustic mashup treatment. Includes Call ...

Here's how to hide all those extraneous Apple TV apps
... over 50 different Apple TV channels to watch — but you probably won't watch them all, and you probably don't want to sift through so many extraneous ...

AllPolitics - Berger Saw No 'Extraneous Influences' On Foreign Policy - Sep. 11, 1997
WASHINGTON (AllPolitics, Sep. 11) National Security Advisor Sandy Berger testified today that he saw no evidence of "extraneous influences" on ...

Extraneous lyrics News, Video and Gossip - Gawker
... mass appeal are most often required to trade in cerebral sesquipedality for catchiness. But why can't we have both? That's the question extraneous ...

When the Defense Bill Collides With 'Extraneous' Politics
The Pentagon authorization measure always has to sail through controversy before passage. But this year\'s fight over budgeting is especially ...

Mitt Romney On Outsourcing Of U.S. Olympic Uniform: These 'Matters Are Extraneous'
... nominee Mitt Romney has refused to take a stand, merely saying, "The Olympic Games are about the athletes ... and these other matters are extraneous, ...

“Extraneous Lyrics 2012″: Watch All The Words Left Out Of Pop’s Biggest Songs Of The Year
... but fairly to-the-point when delivering a message. For the last three years, Dave Werner has been out to remedy that with his annual “Extraneous ...

Extraneous Lyrics, Music Videos Feature Reworded Pop Songs
Dave Werner of Okay Samurai uses a thesaurus to come up with the lyrics for his popular Extraneous Lyrics series. Each of his music videos rewords ...

Pai: FCC Should Scrap Extraneous 'Voluntary' Merger Conditions
New FCC commissioner Ajit Pai intimates he does know jack about the commission, and suggests...

‘If I Was Your Male Companion’: Extraneous Lyrics Of 2012
... Justin Bieber shoved down our mouths that it’s beginning to get redundant. While we may hate it, it’s necessary just one more time. This extraneous ...

Resources last updated: 3/20/2016 2:33:02 PM