How do I make a table that will truncate my data field?

I have a field "0002222 Catheter". I need to create a table that just pulls 
out the 2222. I thought I could truncate somehow?
0
Utf
3/30/2007 1:34:01 AM
access.queries 6343 articles. 1 followers. Follow

3 Replies
582 Views

Similar Articles

[PageSpeed] 9

If the numbers are always first, create a query, and type this into the 
field row:
    Val(Nz([F1], "0"))

After verifying that this give the right results, you can turn it into a 
Make Table query, along with the other fields you want. Make Table is on the 
Query menu, in query design view.

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"den" <den@discussions.microsoft.com> wrote in message
news:FE2D00CC-6528-45D5-BBC8-3477FA9494C4@microsoft.com...
>I have a field "0002222 Catheter". I need to create a table that just pulls
> out the 2222. I thought I could truncate somehow? 

0
Allen
3/30/2007 1:55:57 AM
Allen,
1) Do I put in the criteria or field?
2) It is asking for a value for F1.

I am wondering why I can't use Left[fieldname},3) to get to the 2222 
portion. Then use a right funtion to get rid of the words?

I do not understand how your expression works, so trying to keep simple.
Thanks for the feedback!
D

"Allen Browne" wrote:

> If the numbers are always first, create a query, and type this into the 
> field row:
>     Val(Nz([F1], "0"))
> 
> After verifying that this give the right results, you can turn it into a 
> Make Table query, along with the other fields you want. Make Table is on the 
> Query menu, in query design view.
> 
> -- 
> Allen Browne - Microsoft MVP.  Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
> 
> "den" <den@discussions.microsoft.com> wrote in message
> news:FE2D00CC-6528-45D5-BBC8-3477FA9494C4@microsoft.com...
> >I have a field "0002222 Catheter". I need to create a table that just pulls
> > out the 2222. I thought I could truncate somehow? 
> 
> 
0
Utf
3/30/2007 2:08:01 AM
Sorry: F1 was an example for your field name.
Substituate your field name.

Left([F1],3) would just give you the 3 zero's, I think?

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"den" <den@discussions.microsoft.com> wrote in message
news:94243BA2-36CC-4933-A997-76B99F31FC7A@microsoft.com...
> Allen,
> 1) Do I put in the criteria or field?
> 2) It is asking for a value for F1.
>
> I am wondering why I can't use Left[fieldname},3) to get to the 2222
> portion. Then use a right funtion to get rid of the words?
>
> I do not understand how your expression works, so trying to keep simple.
> Thanks for the feedback!
> D
>
> "Allen Browne" wrote:
>
>> If the numbers are always first, create a query, and type this into the
>> field row:
>>     Val(Nz([F1], "0"))
>>
>> After verifying that this give the right results, you can turn it into a
>> Make Table query, along with the other fields you want. Make Table is on 
>> the
>> Query menu, in query design view.
>>
>> "den" <den@discussions.microsoft.com> wrote in message
>> news:FE2D00CC-6528-45D5-BBC8-3477FA9494C4@microsoft.com...
>> >I have a field "0002222 Catheter". I need to create a table that just 
>> >pulls
>> > out the 2222. I thought I could truncate somehow? 

0
Allen
3/30/2007 2:46:47 AM
Reply:

Similar Artilces:

Customizing Recipient Polices to filter for FROM email field?
I need to find a solution to a new policy that our Exchange server must follow. We currently run with an email retention limit of one year, no problem. Now I need to run an exception to that Policy where email from one particular user must be deleted from any mailbox if it's older than 14 days. I'm at a loss finding information that indicates this is even possible. Is it? Any suggestions would be greatly appreciated. I am running Exchange 2003 SP1 on Win2k3. Thanks, Mark ...

How do I make a 'box and whisker plot' graph in Microsoft Excel?
I am in Year 12 and am doing a stats assignment. The project states that i MUST insert a box and whisker plot for some data, but i don't know how to do this. Does anybody know? Hi, Here are some sites on the topic of stats charting not just box and whisker. http://peltiertech.com/Excel/Charts/statscharts.html http://www.processtrends.com/toc_statistical_charts.htm http://tushar-mehta.com/publish_train/data_analysis/16.htm http://people.stfx.ca/bliengme/ExcelTips.htm Cheers Andy -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info "Year 12 student who needs help" &...

Passing data from one form to another
Hello I have a form called frmMaindB and it has 5 text boxes on it (txtEmployeeTime, txtDTRegular, txtDTReason1, txtDTReason2, txtDTMaintenance) when I double click on the text box it opens up a pop up form named frm_DecimalConversion. On this form I have two text boxes one box I enter data into and the other calculates or converts the data to a decimal. The box that converts the data is called txtDecimal. Then I have a close button which I want to use to close the pop up form and insert the data into the text box I double clicked in to get the pop up or (frm_DecimalConversion). I have r...

data value in Form field if no table entry
I have a form with a field which pulls through and concentenates 2 fields called [ContactFirstname] and [ContactLastName]from my table There are however some customers for whom I do not have names and therefore instead I would like Sir/Madam to appear in the field in the form I think I have seen this done somewhere using ELSE? but can't find it Any help/ideas gratefully received Perhaps something like this: Nz(Trim([ContactFirstname] & " " + [ContactLastName]), "Sir/Madam") -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access use...

Ho to make one field required based on critera of another field?
I'm creating a form and need to make the "comments" field required if the "code" field is =>20. I appreciate suggestions! Deadline Monster is lurking! User enters the job processing endcode value (numeric) into the "code" field. If the endcode is =>20, comments are required. (P.S. I don't know VB) Thanks! Star You would put your validation code in the Form's BeforeUpdate event. If Me.EndCode >19 Then If Len(Me.Comments & "") = 0 Then MsgBox "Comments are required" Cancel = True End If End If ...

Numbers in a text field-can I add them up?
Hi everyone! Using A02 on XP. I have a table of data with survey response fields that contain a 0,1,2,3,4 or 5. However, the fields are formatted as text, not numbers. I need to add up certain blocks (Items 1-6, Items 7-23, etc.) and then do some averaging. I cannot change the field types from text. Must I append to a new table or can I do something right in my query? I've got one field in my query like this: ES: [Item1]+[Item2]+[Item3]+[Item4]+[Item5]+[Item6] My result is: 553453 or 554444, etc. I want: 25 or 22, etc. I would really appreciate any help or advice. Thanks...

Constructing Hyperlink from the Database Record fields
I am working on a Windows XP environment using MS Office 2007 including Access 2007. I want to open a document from Access 2007 which I can easily do with Hyperlink type field. However since all the necessary information is already in the Database Record I try to avoid creating additional field which would be a Hyperlink type on the Form unless it is absolutely necessary. Below is the code that I have to construct the FullFileName which consisted of ServerName, Division, Unit, RequirementDirectory, FolderName and the FileName itself. As you can see the Database records has al...

making an equation in access
Hi, I would like to create a field that works out a formula based on other fields. i.e field z=field4, when field 1<field 2 - field 3 etc. Yes, it may be a silly question but I am only new to this....Thanks, Dani. Dani, recommend against creating a "field" in a table and storing this value. One of the generally accepted rules of relational database development is not to store a "computed" (any value that is based on the value of other fields in your database) value in the table. It is a waste of database space, and will eventually result in bad data (...

How do I make hyperlink target scroll to the top-left of spreadshe
I can't remember the setting to make Excel automatically scroll my hyperlinked cell to the top-left. For example, if my hyperlink is in cell A1 and the hyperlink destination is cell Z30, when you click the hyperlink in A1 the cell Z30 is now displayed in the top-left of the spreadsheet. It seems like there was a checkbox in the Options dialog box, but now I can't find it. I did this awhile ago, but forgot to write down the information. Hi Lori Tools>Options On the Transition tab Transition navigations keys -- Regards Ron de Bruin http://www.rondebruin.nl "Lori W....

Pivot Table Question #15
Hey all, Love pivot tables but i have a question, the table is set up as so Month Pallet# BoxesPur BoxesSold Price Frt Gross Net Jan 1 5 1.0 ..3 Formula Formula 2 5 2.0 .5 3 10 3 .15 Jan Total 10 10 6.0 ..95 So, the problem is in the Jan Total row, is there a way...

Help ! formatting data to text
I am creating data in an Excel spreadsheet. I then want to get that data into a simple text email. I have some problems and questions... 1) how do I get the columns of data to line up evenly when I copy the data to email text ? Keep in mind I need to be in simple text format, not HTML or rich text. Every time I do this, all columns become chaos and are unreadable. 2) Is there a simple way to automate the creation of an email from an excel file ? this is less important to me. Thanks in advance WxMachine #1. I think it may have to do with what email client you use, too. I copy and ...

How can I stop charts from refreshing when changing source data?
My problem is, that I am working with a lot of data and when I change some of the ranges all charts in my view refreshes and it takes much time. My pc is aP4 3GHz, 2GB RAM so that should not be the bottleneck. Is there any way to force the charts not to update all the time? ...

User Defined Required Fields
I have set several field on sub window Sales User-Defined Fields Entry of Sales Transaction Entry as "Required". If the user remembers to click User-Defined, then they become required. But if the user never clicks on User-Defined from Sales Transaction Entry, then they can still save the new document without the required fields entered. Does anyone know what I can do to fix this asside from continual user training? Your answer is VBA. You own Modifer, so you also have VBA enabled. You'll need to write VBA code to open the window (literally, push the button) then set th...

how do I remove fx from the function line, can't enter data
I have the fx displayed just under my toolbar, and I can't enter or change data in any of the cells in the file. I can't get the red X, the Green check mark, or the black = sign to appear. There are very few areas that are not "greyed out" under the headings at the top. This situation applies to all of the excel files on this computer. I have Excel 2000. Please help. Can you move the cursor around anywhere in the spreadsheet? "dmdranch" wrote: > I have the fx displayed just under my toolbar, and I can't enter or change > data in any of the c...

Field mapping for Opportunity Products
Why I can't add some field mapping for OpportunityProduct system relation with Opportunity? I need to know the default pricelist that was assigned for an Opportunity when I am at OpportunityProduct form. ...

UserForm will not appear
Here is my code: Private Sub CommandButton1_Click() UserForm1.Show End Sub That's it. But every time I click on CommandButton1, I get this error: "Application-define or object-defined error". The user form worked up until today and I can't think of anything I've done to affect it. Can anyone help me fix this? I can't seem to recreate the error. Do you have any code in the Userform1 Intialize Event? If so, post the code in that event so we can try to fix the bug. -- Cheers, Ryan "Luke" wrote: > Here is my code: &g...

To write living will do I need special format
I just need to change and update a living trust You should consult someone with the appropriate legal knowledge in the jurisdiction in which you are domiciled. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "belladonna" <belladonna@discussions.microsoft.com> wrote in message news:F25A64CB-355F-44E9-A005-16AA61DA15A7@microsoft.com... > I just need to change and update a living trust ...

how do i recover data in publisher
i have been entering addresses to set up a mail merge. i cllicked the "ok" button in the window and lost all data . can i recover it Look in a folder in My Documents named "My Data Sources". Publisher data is saved as .mdb(Access) file. Did you try selecting "Edit Address List" in the Mailings and Catalog menu (Tools)? -- Mary Sauer http://msauer.mvps.org/ "dee" <dee@discussions.microsoft.com> wrote in message news:690430F1-36DE-47EE-8B7D-DD12A096C075@microsoft.com... >i have been entering addresses to set up a mail merge. i cllicked ...

Using subtotals as single data entries
Sorry about the subject--I couldn't figure out how to describe it simply. I have a large file (16,000 records) of amounts billed by roughly 10,000 service providers. A number of these providers have multiple office locations, so each record is unique to a specific office location. In other words, a provider who billed from 3 different office locations will have 3 entries. Each provider has a unique provider ID number, which stays the same regardless of which office location he is billing from. I want to be able to subtotal the amount billed by each provider for all their office locations...

How can I keep track of when (date and time) data is entered into.
I am trying to create a spreadsheet for a high school class. I need to be able to track when a student has entered data into specific cells of the spreadsheet. Any ideas? In the code behind the worksheet, enter (eg) Private Sub Worksheet_Change(ByVal Target As Range) Cells(1, 1).Value = Now() End Sub This will enter in Cell A1 the date and time at which any entry is made in that worksheet. If you need the location of the time-stamp to vary according to which cell is changed then you can test the value of Target and vary the destination cell accordingly. -- Return email address is n...

How can I cut data out of HTML table, into msExcel and just take the data & columns? (but NOT the formatting & URLs!)
Hi This is driving me ABSOLUTELY NUTS! How can I keep the rows & columns of data that I am copying and pasting off a website (my own in this case!), into a spreadsheet... WITHOUT taking all the data formatting? If I paste out of Ms IE v6 into Ms Excel (2003), it does at least keep the columns (something that doesnt happen if I paste out of FireFox, fwiw). But it pastes with all the formatting & URLs etc - which I DONT WANT! OK, I can save as .CSV, close, 2 warnings, and re-open but when done REPEATEDLY this is a damned nuicance! Any suggestions? Ship Shiperton Henethe ship w...

zz report date truncation
We run only z reports at end of day. We will be running cashier shifts soon and would like to run z and zz reports the way they were intended. Is there any way to truncate the zz report date for each register without it running since the beginning of time and using a truckload of paper? Thanks in advance! This may not be the most graceful solution, but you could simply turn off your printer before 'printing' the zz report. Then manually delete all print tasks for that printer before turning it back on. The report won't print, but RMS will think it did. "TV hardwa...

Retrieving sorted data from same table.
Hi All, I am working on a table (mentioned below) I am looking for a query which can get me the data according to the =93id=94 column with respect to speed. The condition is that I have to get three consecutive entries which have speed > 60 Below is the sample table with data on which I have to retrieve the data on above condition. The output i need can be as given below DVXC002 12/10/09 0:12 96 DVXC002 12/10/09 18:40 89 DVXC002 12/10/09 19:43 65 DVXC005 12/10/09 11:56 69 DVXC005 12/10/09 15:26 62 DVXC005 12/10/09 17:35 85 Need your help urgently....Thanks in advan...

Import directory data into Excel 2003
I have over 1000 media files that I would like to extract information from and put into an Excel spreadsheet. Using Explorer, I have defined the fields I would like to see, such as title, duration, comment etc. Now, I need to import this data into Excel. So far, I've not been able to find a way to do this. Can someone offer some suggestions please? Thanks, Nigel -- www.myoldcontacts.com - Tell your friends to tell their friends www.sysadmininc.com - Consultancy, Service, Sales, Networking... www.british-expats.com - Connect with British Expats World Wide www.kxez.com/shows_britishinv...

Showing the perimeter of a set of (X,Y) data!
Good day all, I need to plot the perimeter of a set of data. I have a set of (X,Y) data with error bar and it is a nice mess so I just actually need to see (show) the area were the data can be found. Then hopefully overlay an other set of (X',Y') data and show that they both cover the same surface of existence. i.e this is a set of metrology measurement in X and Y of a part build from different mould. Obviously you get a nice cloud of X and Y but does the new material offer the same 'cloud' ? Thank you I think the easiest way to do this is plot the data on a XY Scatter cha...