Remove Part Of A String
Feb 7, 2005
Hi folks,
I have a table with the words "Church of (whatever)" in one of the records. I am attempting to do an update query to remove the "Church of" part but leave the remaining part of the string. I am using a combination of Format and left but am not having any look. Any suggestion are much appreciated.
Thanks
Colin.
View Replies
ADVERTISEMENT
May 28, 2015
I have a manual date format that looks something like:
02/16/2015 09:06:15 AM PST
I would like to truncate the text so that just the date is showing. For all that I have found, I can remove a string from the beginning? any tips on removing a string from the end?
View 6 Replies
View Related
Aug 13, 2013
I am needing to compare some information in a way I cant with the normal Unmatched Query.
I have 2 tables with the fields:
| PHONE1 | PHONE2 | FIRST | LAST |
What I need to do is have Table 2 check against Table 1 to see if any of the 'PHONE1' records match 'PHONE1' or 'PHONE2,' and if they do have them remove just the information from PHONE1, not the entire record.
Then I would have to repeat the process to do this with PHONE2. Having it check against 'PHONE1' and 'PHONE2' in Table1.
If both PHONE1 and PHONE2 have a match, the entire record would be deleted. If not, it would keep whichever did not match.
I am currently having to do this manually, because if I just run an Unmatched Query it gets rid of the whole record regardless of if PHONE2 is a good number or not.
If any more information is needed, let me know. Like I said, Im relatively new to working in Access and dont know much.
All of the fields are 'TEXT' type.
Access 2003 on Windows XP.
View 8 Replies
View Related
Nov 29, 2005
I have a bunch of server names that have names like aaa.bbb, xxx.yyy. All i need from these server names is the name before the first "." so in the first example all I would need is aaa. I've been using this formula in excel MID(A1,1,FIND(".",A1) - 1). This works great.. Is there any way to do this in access?
View 1 Replies
View Related
Aug 1, 2014
I have a criteria in a parameter query that asks the user to enter a Subsystem number (such as 4596-666-001).
The source data for my database has Systems (e.g, 4596-666) and each system has several Subsystems associated with it (e.g, 4596-666-001, 4596-666-002, etc). The System and Subsystem numbers are stored in the same column of the source data spreadsheet, and hence the same field in my database.
The source data is structured in such a way that Systems and Subsystems have different information. I would like to set up a query that shows the System information as well as the Subsystem information.
For example, if the user enters 4596-666-001 into the parameter dialog box the query returns all the information for 4596-666-001 and 4596-666 (but NOT any other Subsystem).
As a work around I have set up an OR situation where the user first enters the Subsystem number and then another parameter query dialog opens and they enter the System number. This works but is not as nice as simply entering the Subsystem number and having all information returned.
Is there a way to set up my query so the when 4596-666-001 is entered an OR is generated using the first 8 characters of the Subsystem number?
View 1 Replies
View Related
Sep 10, 2013
I'm trying to find a function in access that could do the following:
ZAB103-3012
ZAF405-HD-0001
Turn those cells into:
AB103
AF405-HD
Pulling everything to the right of the Z in the last step is the easy part but I can't figure out what function would be able to find the last "-" in the cell and pull everything to the left of it.
View 6 Replies
View Related
Apr 26, 2006
I know there are many posts on this but still cannot find what I want ....
I have a string ....
... <surname>bloggs</surname> <fornames>Jane</fornames> etc.etc.
... <surname>williams</surname> <forenames>Jo</fornames> etc.etc.
In a query I know how to:
Find the Start and End Postions as follows:
StartSurnamePos: InStr([string],"<surname>") returns 19
EndSurnamePos: InStr([string],"</surname>") returns 34
I also know that by adding 8 to StartSurnamePos I can get Bloggs but how do I stop it there.
Using left, Right or Mid how do I pull out just
bloggs Jane
Williams Jo in seperate fields?
Thanks in advanced.
View 1 Replies
View Related
Feb 28, 2012
I have a text box and currently this is my control source
="Testing " & [test]/3
test = 1000 so my text box reports:
Testing 333.333333333333
Is there a way to make it into a form like $333.33...Also is there a way to make [test]/3 come out in a money text form? like "Three hundred thirty three dollars and thirty three cents.
View 7 Replies
View Related
Mar 8, 2006
I have this query:
INSERT INTO 1_2_06 ( Issue_ID, Assigned_To, ListType )
SELECT Issue_ID, Assigned_To, 'QPT'
FROM QPTActions
WHERE QPTActions.Entry_Date<=DateValue('1/2/2006') And QPTActions.Close_Date>DateValue('1/2/2006');
The Assigned_To values are a Lastname, Firstname format as they come out of the first database. But I need the comma stripped before they get entered into the INSERT database. Is it possible to do this on the fly?
View 2 Replies
View Related
Jul 29, 2014
I have a field called PropertyID which stores a unique 13 digit number, the 10th digit is always a 3. I want to remove the 3 to leave a 12 digit number.
I've tried running an Update query using Replace([PropertyID],"3","",10,1) but no joy, what am I doing wrong?
View 10 Replies
View Related
Apr 19, 2013
I have a weight field that I've been populating with the weight and the unit of measure. I want to seperate those into 2 different fields. I've created a new field called UnitofMeasure and now I need to go back and remove all the instances of 'oz' and 'lbs' from the first field.
Is this possible with SQL?
View 5 Replies
View Related
Dec 3, 2013
I'm creating a string with an IIf statement and placing a comma between values. How do I delete the last comma at the end of the resultant string?
View 2 Replies
View Related
Dec 5, 2013
I'm using Access 2010.
I'm trying to append some text to a field used for comments for a Team Member profile. I don't really want to create a comments table for multiple comments regarding changes to the profile.
Some comments already exist and I want to add some more information programmatically when the profile is updated using a batch update at the end of a reporting period.
I thought it'd be easy in a query,
New Comment:[EXISTING COMMENT] & "; Additional Comment" But I was getting HTML Tags when I tried to concatenate the strings. "<div><font color=black> EXISTING COMMENT HERE </font></div>" then a linefeed and <div>Â </div>; Additional Comment HERE.
I found a function to kill all the html tags but the visual linefeed and the "Â " tag won't go away.
I'd like to concatenate two pure text strings to get one pure text string to put back into the comments field which will just be text wrapped with no forced linefeeds.
View 3 Replies
View Related
Dec 16, 2004
I have what I think is a difficult problem to overcome...
I am designing a form to create an invoice. The user will select a workstream and a date range in form frmInvByHrs. Within this I want two sub-forms, one is frmInvByHrsTsht and the other is frmInvByHrsBill. I want the first one to display all the staff and their hours done, and the second one to be in data entry mode where you can enter the hours you want to bill. Each sub-form is based on a separate query.
Is it possible to do this? ie. to have one sub-form in data entry mode, and the other not? It seems to me that the data entry mode is controlled by the MAIN form regardless of the sub-form settings!
If this is not possible, do you know how I can acheive this?
Thanks
S
View 1 Replies
View Related
Nov 3, 2006
Hi everyone,
I have refined my query from previous threads to involved a module function. This calculates more acurately no of working days between dates and takes into account a holidays table. (All credit to Arvin Meyer on the module:) )
However because the Leave Year starts at the 1 July and finishes 30 Jun I need to compose the date for any current year Year(Now())
Enclosed scrdmp shows my query design. I can easily get it to work as you see it, but obviously as each year rolls over, the year needs to change.
Have looked at many posts but can't find what I'm looking for. This one will get me over the hurdle.
Many thanks,
View 6 Replies
View Related
Jun 7, 2013
MS-Access VBA code to separate numbers and string from an alphanumeric string.
Example:
Source: 598790abcdef2T
Output Required: 598790
Source: 5789065432abcdefghijklT
Output Required: 5789065432
View 13 Replies
View Related
Mar 12, 2007
Hi all,
I was looking for some help. I am trying to setup a table with a field for web address. People are entering www.website.com etc however I need them to make sure it starts with http:// Is their any way I can put validation on the field to make sure that this is entered? Or maybe I could use an input mask?
Any suggestions would be gratefully recieved.
Andy.
View 3 Replies
View Related
Oct 27, 2006
I have a column called CPU_S within a table called workstation that contains sample text like P111 933
I want to use the update command to search the CPU_S column for entries that contain this in there string then add P3 to a column called CPU_N
So far I have the code below but I don't know how to search a column entry for a specific string within a string. Can this be done and how?
UPDATE workstations SET CPU_N = "P4"
WHERE CPU_S = ;
View 3 Replies
View Related
Mar 13, 2006
I am having more trouble with the old database I am trying to make.
Can someone have a look if I attach it?
I don't think the ID fields in each of the three tables are working togehter.
Shouldnt they be the same ID number of each record for that person across the three tables?
Thanks.
View 2 Replies
View Related
Aug 8, 2006
I am trying to create a Part Number Database and want it to start at 100000 instead of 1. Can someone tell me how I can get Access to start there?
TIA.
View 4 Replies
View Related
Apr 7, 2008
First time on here and I am looking assistance with the last part of this code. Can someone tell me what this is looking for thanks...
ExlFile.Application.activeworkbook.SaveAs "........Compliance Reports" & Rtn & BU & "-" & Cat & ".xls
View 2 Replies
View Related
Jun 29, 2006
I have a field called images and its name is like abc0001, abc0002 etc, i want to update all the abc to abcd0001, abcd0002 etc, how can I do this using update query or is there any other way to do this, thanks for any help...
View 1 Replies
View Related
Jul 23, 2005
On a report I have a field that has a value that can be anywhere from 15 to 25 char. Can I set up the report field to only display the 1st 10 char. ?
jon
View 9 Replies
View Related
Jan 16, 2006
I have a data base with the field named "PartNumber" this is a 13 diget number. How can I search on the last 7 digets only
View 2 Replies
View Related
May 27, 2007
Hello. Im new here and also new to both Visual Basic and Access so please be patient with me :)
I've downloaded SearchDB.zip uploaded by agehoops. Its works exactly like its supposed to but I need to update it a bit.
Im making a MovieDatabase and have a table with Orginaltitle, SwedishTitle, Director, Actors and so on. When I search in "Director" for "Francis Ford Coppola" or just "Francis" the movies which is related to him comes up. But when I search for "Ford Coppola" or only "Coppola" nothing comes up. I want the user to have that possibilty to search using the last part of the name too. Is that possible?
When searching with the binocolor icon it works fine when chosing "part of record", i think thats the english translation for "Del av fält". I have a swedish acces version so im not so sure but anyhow I think you understand what I mean.
To sum it up I want the ability to search writing only a part of what the record contain including the last part and not only the first part like it is right now.
Appreciate any help!
Regards,
SoloJuve
View 6 Replies
View Related
Feb 13, 2008
Excel in Access (Part 1) (http://www.access-programmers.co.uk/forums/showthread.php?p=671226)
Excel in Access (Part 3) (http://www.access-programmers.co.uk/forums/showthread.php?t=143970)
Video Version HERE: (http://www.access-programmers.co.uk/forums/showthread.php?t=144045)
How to use the Normalization Form (http://www.access-programmers.co.uk/forums/showthread.php?t=143983)
In Excel in Access (Part 1), we went from this:
http://i185.photobucket.com/albums/x317/UncleGizmo/StudentTableBoolean_2.png
To this:
http://i185.photobucket.com/albums/x317/UncleGizmo/StudentTableTransposed2.png
This was achieved with a form based tool available to DOWNLOAD here. (http://www.access-programmers.co.uk/forums/attachment.php?attachmentid=20619&d=1202664804)
See instructions on its use here: (http://www.access-programmers.co.uk/forums/showthread.php?t=143983)
However you may be looking at the new resultant table and wondering what on earth to do with it. I hope to take you through the process of making it into something useful in this thread.
The first thing you will notice is that where the check box is not checked, then that whole row is redundant, for instance there’s no need to record that ID number “1” --- “Has Not” taken Maths, English, Geography, Physics etc, it would suffice just to record the subjects that have been taken , In this case Biology, PT and Social. Looking at those entries in particular, then a general rule of logic can be defined, “delete all the rows where the check boxes are false”.
http://i185.photobucket.com/albums/x317/UncleGizmo/DataSheetForm_1b.png
Once you have deleted all of those rows,
http://i185.photobucket.com/albums/x317/UncleGizmo/DataSheetForm_1c.png
then it becomes obvious that the check boxes themselves which now “All” contain a true value are also redundant, they can be deleted just leaving you the text entry identifying the subject taken by each student.
http://i185.photobucket.com/albums/x317/UncleGizmo/DataSheetForm_1d.png
Using the “relational” properties of the database that is one more thing you can do which will improve efficiency and that is to replace each text entry --- Maths, English, Geography, Physics etc, with a number linking that field to a look up table.
First of all you need to create a look up table; this can be done by applying a create table query to extract just the unique values for the “subject” There is a video showing how to do this here: (At time index 1min) (http://www.viddler.com/explore/TonyHine/videos/67/fullscreen)
http://i185.photobucket.com/albums/x317/UncleGizmo/DataSheetForm_1e.png
This unique list should be called “tblSubject” this table is not quite finished, you need to add an identity column to the left of the text representing the individual subject, this identity will then appear in the previous table.
http://i185.photobucket.com/albums/x317/UncleGizmo/DataSheetForm_1f.png
Once you have completed the “look up table” you then need to replace the entries in the student subject table “tblStudentSubject” where it shows subject in text form with the number representing the link to the look up table. This is the query:
http://i185.photobucket.com/albums/x317/UncleGizmo/DataSheetForm_1g.png
And here is the new column created:
http://i185.photobucket.com/albums/x317/UncleGizmo/DataSheetForm_1h.png
This way your design changes to the table are making it much more efficient, holding the same information but with less data.
http://i185.photobucket.com/albums/x317/UncleGizmo/DataSheetForm_1k.png
View 4 Replies
View Related