Delete Spaces In Text Field

Jun 28, 2006

We have a table with approx 2m records. Just three fields:
Key (primary)
Postcode
Postcode reference

The problem is with the postcodes. Many of these have a double space in them such as this DE13 7EL but we need DE13 7EL.

Find and Replace runs into a problem because of the number of records.

An update query seems obvious but we can't figure out what to put in Update to as this appears to return the literal value.
We are not VBA programmers so that isn't really an option for us.
How can we strip out that extra space?

View Replies


ADVERTISEMENT

Reformatting A Text Field With Spaces

Dec 7, 2006

Hi

I have a table with postcodes (1.6M rows) that have had all the spaces removed. I want to match another table to it and ordinarily would have removed the spaces from the postcodes in that but I think because of the vol (2.5M rows) Access is reluctant (it either crashes or only updates a few thousand).
A better way would be to reformat the postcode using some SQL or VBA code. The trouble is the postcodes are different numbers of characters and the space would either need to be after the 3rd when there are 6 characters or after the 4th when there are 7 characters.
eg PO121DL becomes PO12 1DL
PO91UL becomes PO9 1UL

I can concatenate fields and count characters but am unsure as to the best way to approach this in terms of coding and structure? Using Access 2002.

Any thoughts/tips etc would be appreciated thanks

View 2 Replies View Related

Delete Space In Text Field

Dec 5, 2007

In my Dbase, I have a table with a text field. Field name is Country
There are over 5000 records in the table and many of these in the Country field start with a space. I would like to get rid of this space as to ensure that all text starts with a character, rather than a space.
How can I achieve this.

View 4 Replies View Related

Delete Some Text From A Field With Other Text

Oct 8, 2014

I am trying to delete some text from a text field. There are almost 8000 records and almost all of them are like this.

Example: johnsmith-2.network.home.com

I want to delete everything after the dot and including the dot, to end up with "johnsmith-2". How do I do that? I think I can do it in a query, but don't remember how.

View 3 Replies View Related

Queries :: Delete All Records That Are Numbers In Text Field

Oct 24, 2013

I have a field that is text format. However many of the records in that field contain numbers.I want to delete all the records that are numbers in this text field, leaving only records with textual data.

View 4 Replies View Related

How To Add Spaces To Text String?

Sep 21, 2005

Access 2000. I have table of many hundreds of records. One of th fields of text looks like this: XXXXXXXXXXXX and I want it to look like this: XXX XXX XXX XXX by adding the spaces. Would someone please show me how to write the function or code to add the spaces to the text as shown : Thanks :o

View 3 Replies View Related

Removing Unwanted Spaces In A Text Box

Feb 2, 2006

I have two questionaire forms in a database. There are no tables or queries involved.
The answers to each questionaire are compiled into text boxes, one on each Form. On the main form I have another text box that puts all the answers together so that this can be transferred to another program. An example of what is in each text box is as follows:

Text1: IIf([Check325]=True,[Combo77] & " " & [Combo59] & " " & [Text65] & " " & [Text69],"") & " " & IIf([Check329]=True,[Combo78] & " " & [Combo61] & " " & [Text66] & " " & [Text70],"")

Text2: IIf([Check326]=True,[Combo102] & "" & [Combo188] & " " & [Combo91] & " " & [Text94] & " " & [Text97],"") & " " & IIf([Check330]=True,[Combo103] & " " & [Combo92] & " " & [Text95] & " " & [Text98],"")

These are just small extractions. My problem is, if an answer is not necessary in the first lot of text, but an answer has been supplied in the second lot, how do I remove the spacing that has resulted from my Formula in Text1. -

e.g: Normal answers would show perhaps
Yes Twice 16 25 Red Peter Ford Football 1965 - Whereby the first 4 answers are from Text1 and the remaining answers from Text2.
If some answers are not necessary from Text1 I would get the following result:
SPACE SPACE SPACE Twice Red Peter Ford Football 1965

Any assistance would be gratefully accepted.

View 3 Replies View Related

Export NULL Spaces To Text File?

Nov 10, 2004

Hi members,
I have two empty columns in my access database whose total width is supposed to be 385 chars (255+130). I am trying to find a way to be able to export this blank field with a total of 385 blank spaces onto an ASCII text file.
A sample row looks like this:
L ***** 385spaces needed here ***** 888888 EXAMPLE DEALER NAME 1234 EXAMPLE LANE EXAMPLE ADDRESS LINE 2 EXAMPLE CITY CA88888 80088812348008881234FORD JOE DEALER NAME 8008881234

After the first letter L in position 1, I need to have 385 blank spaces and then at 387th place I have some other data to follow.
I tried a lot to use the export wizard, but it doesn't help. Is there a way to do this?
I would really appreciate any help.
Thanks,

View 4 Replies View Related

Need To Remove Spaces From Field In Table

Sep 28, 2006

I have a table that for some reason when I imported the data, placed some spaces before about 75% of the numbers in only one column. I need these numbers to be exactly the same as in another table because I use this number to compare to records and import other data depending on the corresponding numbers.

I tried doing a find and replace, but for some reason it doesn't find the spaces to replace. If I type in the space and the number, then in the replace with type only the number, it works. But I cannot do that since there are literally 10's of thousands of different numbers.

Someone mentioned a "LTRIM" command. Does this work within Access and if so, how does it work?

Thanks,
David

View 3 Replies View Related

Dealing With Spaces In Field Names

Nov 2, 2007

I have an imported file coming from another department and the one of the field names I need to use has spaces. I have tried " " and [] but they don't work. What is the proper syntax for this?

origfield = rst.Fields("FVH PLAN")

Thanks.

View 1 Replies View Related

Field Names With Spaces And Linked Tables

Apr 16, 2007

Hi all,

I have an Access DB with hundres of queries and reports, now I have to use an external DB (Oracle) and export data keeping the rest, no problem with that, I have added linked tables through odbc and works fine.

My problem is that some of the tables have field names with spaces, and Oracle doesn't admit them. Does anybody knows how to solve it without having to modify all the queries, etc?, I've been thinking about aliases or views over the linked table but I haven't found a way to create these.

Any help?

Thanks

View 2 Replies View Related

Trying To Remove Extra Spaces In An Address Field

Apr 20, 2006

I need help. I'm trying to do an update query to delete extra spaces in a field


I want to Change 1234[space][space][space]Elm[space][space] St.

to

1234[space]Elm[space]St.

Thanks,

Vern

View 3 Replies View Related

Modules & VBA :: Remove Spaces From Middle Of A Field

Jun 9, 2015

I'm trying to improve the dialer that i place on microsoft access forms. basically there's a command button that dials the number that is in a text box, but we have a new job that's just come in that requires numbers to be copied and pasted into the text box. these numbers have a space between the dialing code and the telephone number and i need to make the dialer check for a space and remove it before dialing.

Here's the code for the dialing buttons:-

Private Sub cmd_Dial_Click()
On Error GoTo Err_cmd_dial_Click
CT.MakeCall "8" & txt_telephone.Value & "#", "", False, "", "", False

[code]...

View 5 Replies View Related

Blank Spaces After Data In Field Is Causing Problems

Aug 30, 2006

Hi Folks,

I am creating an IF CASE statement in SQL that basically takes the 2 last characters in a field and if they happen to be 'HX' then a special rate is used to calculate the cost whereas if their is no 'HX' as the last 2 characters of the field then a different rate is applied.

(Right([BOARD SPEC DATA],2)) has always worked flawlessly in SQL to render similar solutions. However, unfortunetly the weekly extract that comes into us permits for massive amounts of blank but real spaces after the data in [BOARD SPEC DATA] field so what ends up happening is that (Right([BOARD SPEC DATA],2)) yields a (SPACE SPACE) value even thou many of these values should be 'HX' as they are the last 2 real non-space values at the end of the field.

If there any easy way to fix this keeping in mind that this is how we get the extract everyweek so a search/replace on spaces won't work ... is there any way I can use a Right command but ignore spaces so that it simply renders the 2 real characters at the end of the field as oppossed to blank spaces?

Any help is greatly appreciated.

Thank you very much,


Joe

View 3 Replies View Related

Forms :: Remove Spaces Between Words And Add Hyphen Copy Other Field Access

Mar 25, 2014

GOAL - I would like to have one text box where I enter a sentence

txtKeywords: Access Is For Smart People Smarter Than I

I would like to create a button when clicked moves txtKeywords into another textbox [txtKeywordscombined] field and removes the spaces between the words and adds hyphens

txtKeywordscombined: Access-Is-For-Smart-People-Smarter-Than-I

Would I use the 'Replace' command in even procedures to do this? Another way? Example?

View 1 Replies View Related

Forms :: How To Populate Bound Text Field With Text From A Unbound Text Field

Mar 22, 2014

I have 4 fields that are unbound on a form. img1 img2 img3 img4..When these are entered they are all combined and autofill another unbound textbox = imagename.. what i would like to do is from this unbound textbox 'imagename' ..i would like to populate a textbox that IS bound called FileName

[Event Procedure]
Private Sub imagename_Click()
Me.imagename = Me.FileName
End Sub

View 4 Replies View Related

Text Box With Add/Delete Only

Mar 15, 2007

Is there any way that I can restrict a text box entry from being changed? I am working on a tracking system and presently can capture when a text field entry is added or deleted. I can't capture when a text field entry is overwritten. Therefore I only want the user to delete the present entry and then add a new entry in the text box. Is this restriction possible for a text box?:cool: :rolleyes:

View 4 Replies View Related

Delete All Text Before Character

Jun 12, 2005

I've search the forums...If you can find a thread that discusses this, or can give me some advice on this topic, let me know.

Is there any built-in function that will allow me to delete any text before a certain point in a record... Or perhaps a way to use the REPLACE function to do so?

All of my records look like this (They're ticker symbols):
AMZN:Amazon, Inc
WMT:Wal-Mart Inc.
A:Agilen Tech Inc
MSFT:Microsoft Inc.

I just want the company name...Unfortunately, the ticker symbols aren't always the same length, so I can't use the left or right function.

I need to delete the colon and anything to the left of the colon. I've thought of a great use of the replace function for this purpose...I used wildcards...Too bad it didn't work!

Just The Company Name: Replace([Ticker Symbol and Name],"*" & ":","")

Any ideas?

View 4 Replies View Related

Delete Text Box But Not Label

Jan 25, 2005

Hi,

while designing a form, I want to delete a whole bunch of text boxes, but I would like to keep their labels. how do I do this?

Thanks 4 any tips!

Jean

View 4 Replies View Related

Forms :: Delete Search Field In Order To Point To Appropriate Field?

May 6, 2013

I am using access 2010. I technically have an unbound form but I am changing the record source by command buttons. Switching between 3 command buttons. My problem is that I have a subform that I was linking to the form to an unbound search field. Now I want to switch the master and child links to a field on the form when I switch the record source which happen to be the same field as the unbound search field; however; it still pulls from the unbound search field rather than the field on the form. Do I need to delete the search field in order to get is to point to the appropriate field?

View 1 Replies View Related

Cannot Delete Field !!!

Jul 12, 2006

I have removed the relationship and still can't remove a field. Any help??

I also tried compact and repair and then still will not delete.

View 1 Replies View Related

A Way To Delete A Field In A Table Safely

Sep 2, 2005

I'm using Access 2000. I want to remove a field from an existing table and I'm not sure if this field is used in any of the existing queries, I really don't want to have to manually check all 100 queries to see if it's been used. Is there a query, macro or ??? I can write to do this? How?


Thanks
Martina

View 1 Replies View Related

Delete Field Contents Automatically

Oct 14, 2004

Here is one that I could use some help with.

I have an Updates field in all of my tables. It, of course, holds my audit trail. Im tryiing to figure out a way that I could run a single command and clear the contents of all the Updates fields on all the tables in my db. Ideally, I'd like to auto generate a report for all the update fields on all the tables, then do a purge.

Any ideas?

View 4 Replies View Related

Tables :: Delete All Data From Field?

Dec 31, 2014

A database at our Food Pantry needs to be updated yearly on Jan. 1 by eliminating all data in two fields: "ID Check Date" (date field) and "Signature Obtained" (check box). There are hundreds of records. Is there a way to remove the data from the two fields (columns) while retaining the fields (and their formats) but with no data? We use Access 2010.

View 3 Replies View Related

Delete Fields Referring To Field Number

Aug 5, 2006

I need to trim a lot of tables. Is it possible to delete table fields with reference to the field number instead of field name?

The command 'tblMyTable.Fields.Delete ("FieldName")' takes a string (field name) as input. I rather like to - in a loop - delete say,

Sub DeleteFields()
For i = 40 To 60
tblMyTable.Fields.Delete Field(i) ' Not correct syntax
Next i
End Sub

thh

View 2 Replies View Related

Tables :: Delete All Field Names From Table

May 21, 2015

I need to delete all the field names from my table so I can import a new excel file with different field name headings,

currently I run:

DoCmd.RunSQL "DELETE * from table1"

this deletes the data in the table, but not field names.

What Vba command will allow me to do this.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved