Numerical Values Within A String

Aug 2, 2006

Hi,
Could you help me with the following.

Lets say I have table with one of the column header as notes.
The notes is of type 'text'

In the notes column information like the following is typed out

MAX O.D 3.456" Min ID 1.2" and OAL 3.4"

or

MAX O/D 5.456" Min I.D 1.2" and Min Length 4.4 inches

I want to pull out the first numerical value (3.456 - first example, 5.456 -second example) and the last numerical value (3.4 -first example and 4.4 in second example). How would I be able to do this.

So the end result should be 2 more columns with max od as one and min length as the other.
Regards
George

View Replies


ADVERTISEMENT

Reports :: Report In Which A Textbox Generates Numerical Values And Letter Values

Aug 6, 2014

I have a report in which a textbox generates numerical values and letter values. I want to...On report load - if textbox = numbers then hide otherwise show if it contains letter values.

View 9 Replies View Related

Adding Numerical Values Within Fields

Jun 19, 2006

Hi there

I have an ASP form that saves numerical data to an access database via an insert statement in the asp page.

The main problem i have is that i have some code that adds all the stored values together and provides a total on the screen for the user to print off.

I would like to save this 'total' value to a field in the table but cannot seem to get this to work.

So i thought of running a query in access that would add the sum total of a number of fields and store it to the total field.

Is this possible and how would i go about it?

Cheers

View 3 Replies View Related

Assigning Numerical Values To Text Entries In Another Field

Sep 23, 2004

What is the best solution to this problem? How can I automatically assign a numerical value to a field based on the information currently contained as test in another field? For example, if I have a field that ranks a film as “Poor, Fair, Good, Great, Superior”, how can I have a set value appear for statistical purposes that assigns a number to each of these values (Something like: If rating of current record = “Poor”, then ranking = “1”; If rating of current record = “Fair”, then ranking = “2”; If rating of current record = “good”, then ranking = “3”, etc. I also want to be able to have the values recalculate if someone changes their original opinion.

View 2 Replies View Related

Modules & VBA :: Sorting TextBox Values In Numerical Order

Sep 20, 2014

I've got a rapidly expanding database that I designed to do my quotes for work and now I'm trying to expand it to add up the invoice amounts when the jobs come to fruition. I've got 99% of it working well but as I'm not the only one entering data I'm trying to make it as foolproof as possible and here is my problem.

I have a multi-line textbox that receives 'vehicles' in an abbreviated format and I need to get them in order based on a sort column number in the appropriate table. This i can do but the code I have found removes the duplicates which I don't want as I can can two identical vehicles on the same job.

e.g

Vehicle Sort Order
UNT/FL 500
FL4/45 400
E7/F5 600
UNT/FL 500

I want as

FL4/45 400
UNT/FL 500
UNT/FL 500
E7/F5 600

View 4 Replies View Related

Suppress Numerical Values From Being Displayed On Yes / No Check Boxes

Nov 15, 2011

How do I suppress the numerical values from being displayed on the "yes/no" check boxes when a user clicks directly in the field, instead of clicking the arrowhead as they should?

View 3 Replies View Related

Month String To Numerical Month

Oct 13, 2006

HiI have a field that is text which holds the month in form "oct" etc. I need to pass the numerical value of that month to a function so how do I create an expression that will change it (in this instance) to 09.kind regards in advance.peter

View 5 Replies View Related

Get Combo Box Values Into String Array

Jan 9, 2006

I'm populating a combo box from a query. I'm running a DCount on 2 criteria. The user selects the criteria from 2 combo boxes. If the user types * into the combo box, I want to be able to loop through each combination from the combo box values. I need to get the list of values from the combo box and put it into a string array, however it throws a type mismatch if I did something like
BRANCHES(x)=CStr(cboBranches(x)) 'cboBranches(x)=cboBranches.Value(x)
So I tried to run the sql from vb but found out that I can't return a string value from that (vb sucks). So I'm back to trying to get the values from the combo box. Any help would be appreciated.

View 3 Replies View Related

Copy String Of Values From Form

Dec 22, 2006

I have a form which displays contact details for customers. I want to add a button to the form which concatenates name and address fields, adding spaces and line breaks, and then copies the full name and address so that it can be pasted into other applications (e.g. into a letter).

To do this requires that I implement some code to perform the following actions, but I can't figure out how to do it. Can anyone help?

1. Check Title field. If it is not null, take it's value and add a space after it.
2. Check First Name field. If it is not null, take it's value add it to the output of step 1 and add a space after it.
3. Check Surname field. If it is not null, take it's value and add it to the output of step 2 and add a space and a line break after it.
4. Check the Company Name field. If it is not null, add it's value after the line break and add another line break.
5. Repeat this for every field until the end of the address is reached, then copy the result.

Thanks in advance if anyone can help.

Gary

View 2 Replies View Related

Modules & VBA :: How To Add Check Box Values In To Filter String

Feb 2, 2014

I have got like subform which I think is the tech term I use it to filter dates on field "date raised" and open's a report depend on date's entered in txtstartdate and txtenddate it works perfectly but I need to add some check boxes to check other field's are true/false ...

Code:
Private Sub cmdPreview_Click()
Dim strReport As String
Dim strDateField As String
Dim strWhere As String
Dim lngView As Long

[Code] ....

I need to add code to the text in red well I'm guessing

here goes with what I would like to add
job cancelled1 check box name field name= job cancelled
job on hold1 check box name field name = job on hold
void property1 check box name field name = void property

E.g. if I put date range in my date boxes and tick job cancelled show all record in that date range cancelled same with job on hold and void property

here some code I did but wont work as it not in the same strwhere above

Code:
if me[job cancelled1] = true then
strwhere = [job cancelled] = 1 'field name
else
strwhere [job cancelled] is null
end if

Some how need to add the strwhere to the code above ...

View 8 Replies View Related

String On Button To Update Field Values

Jul 9, 2013

I get an error for this code: this is the error, i can firgure out how to have the string not be the textbox, but sub in the texbox name.

Code:
myFormstr = Array("F_Value1", "F_Value2", "F_Value3", "F_Value4", "F_Value", "F_Value6", "F_Value7")
For Each mystr In myFormstr
me.cboProduct = Me.mystr
Next mystr

View 10 Replies View Related

Splitting Text Values From A String Into Separate Field

Jan 25, 2005

I have a table field which long ago was merged from several other fields. When the data was merged into the field it was delimited by "1." then "2." up to "5."
Example: MergedField = "1.Animal 2.Large 3.African 4.Grey 5.Long Nose"

I now want to split it appart in a query where "1.Animal" goes into expression1, "2.Large" goes into expression2, etc.

I need to base the text on where the one number begins and grab everything until the next number in the mergefield is detected.

Can someone show me the syntax for this.

Thanks!

View 1 Replies View Related

Queries :: Comparing Text Within A String To Keep Only Unique Values

May 15, 2013

I have one field where string contains several words separated by semicolon and my goal is to be able to remove duplicates within the string and keep only unique values. Here is an example:

initial field:
xxx;yyy;ppp;yyy

targeted result:
xxx;yyy;ppp

How this could be achieved ?

View 5 Replies View Related

Modules & VBA :: How To Handle String Values Containing Apostrophes Or Quotes

Sep 2, 2014

My db contains an unlinked form that is used to append records to 1-3 separate tables (tests to see if master records exists, appends if needed, moves on to child records). One of the fields is a text field meant for notes. The VBA errors out whenever this text contains apostrophes or quotes.

Is there a simple way to recall the string field with quotes and apostrophes intact and append it, or will I have to validate and remove them from the string?

View 3 Replies View Related

Modules & VBA :: Join Multiple Values Into String For Summarizing Data On Reports And Exports

Mar 14, 2014

I have to join multiple values into a string for summarizing data on reports and exports. This process in vba is taking up to 10 minutes to process and will get worse as the size of these reports grow.

My method so far is to query the individual items into a recordset, loop through the values, adding them to the string then return the string in the query.

Here is an example:

Public Function SO_Description(intSO As Integer) As String
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strSQLSelect As String
SO_Description = "Profiles: "
Set db = CurrentDb

[Code] ....

View 1 Replies View Related

Numerical Help

Dec 8, 2004

On a bank draft I need the dollar amount spelled out in a text format. Will Access do that? If so, how?

Jeff

View 1 Replies View Related

Numerical Sort

Apr 6, 2008

i have a query that returns data per week number. To obtain the week number i used this : Format([Date],"ww"). This gives me the week numbers great but when the query is sorted the week numbers are not sorted numerically, ie i get this

1
10
11
12
2
3
4
5
6
7
8
9

is there a way to sort my data to be numerical.
Here is the query:

SELECT Format([Date],"ww") AS [Week Number], Sum(Conformance.Scrap_Quantity) AS Scrap, Sum(Conformance.Rework_Quantity) AS Rework
FROM Conformance
WHERE (((Conformance.Procedure_Followed)=False))
GROUP BY Format([Date],"ww");

View 7 Replies View Related

Text In Numerical Field.

Jun 2, 2005

I have to make changes to an existing Dbase. Problem is that in this Dbase it is on one form possible to put text in a numerical field. I need to do this again, however it does not work, Access gives the message that Text will not go in a numerical field. I am talking about a combobox.

What appreciate some tips how to get this done.

Thanks,

Dirk

View 5 Replies View Related

Problem With Numerical Setting

Jan 23, 2007

My problem is the amount is showing on the screen as 3.15654E+11 I need it to show the actual value which is 315,654,000,000
I already have the field set as double.

When I tried to import the field from a csv file, it created errors when I had the field set as Long Integer. When I changed it to double, I didn't get the errors but got the value of these larger amounts as 3.15654E+11

I tried to update query just those records to the value 315,654,000,000 but got another error.

Help!

View 1 Replies View Related

Modules & VBA :: Counting Value And Assigning Numerical Value?

Aug 15, 2013

I am working on an app, that has a field named "Name". I have everything set up with a module, which, for example, the name "John", it assigns 1. when it sees "John" again it assigns 2. Then "Jane" It assigns 1 again. I want the module to see every instance of "John" to assign the same number, 1, then all instances of "Jane" 2, etc. Here is the code in the module I am using, but it is assigning the values wrong. My final plan is to use the numbers for conditional formatting, so all johns one color, all janes, a different color. I can't use the conditional formatting wizard because these names pop up at random, and the names populate at random.

Option Compare Database

Global GBL_Category As String
Global GBL_Icount As Long
Public Function Increment(ivalue As String) As Long
If Nz(GBL_Category, "zzzzzzzz") = ivalue Then
GBL_Icount = GBL_Icount + 1
' MsgBox icount
Else
GBL_Category = ivalue
GBL_Icount = 1
End If
Increment = GBL_Icount
End Function

View 1 Replies View Related

Numerical Wildcard In Access Table

Mar 6, 2015

I have a table which tracks material quotes. I have two fields for the quantity range called PriceBreakBegin and PriceBreakEnd. If I have a part that has contract pricing (no limit on the PriceBreakEnd), can I use a wildcard or something in the PriceBreakEnd field to represent any number, and not just the highest integer I can put in there like 99999?

View 5 Replies View Related

Need An Elegant Way To Calculate Difference Between Numerical Records.

Nov 1, 2007

I'm new to building databases and I wouldn't think that this is difficult but it has stumped me and everyone that I have approached to elegantly perform this calculation.

Essentially I have a table of meters (the best real world example is the watermeter that your community uses to measure how much water you use each month.) Each meter in the table has a "child table" of the date/time that the meter was read and the reading on the meter (stored as a number). I need to calculate the difference between the last two readings in the child table for each meter(essentially how much water each meter has used since the last reading.)

I have been able to sum, average, etc. the meter readings, but I can't seem to find a way to get a difference.

Thanks in advance,

Corwin

View 12 Replies View Related

Calculate Numerical Data In A Text Field

Nov 29, 2004

is there any way I can make a field with a data type that calculates numbers in the field but also allows text to be entered into the field (e.g. N/A or No Score) The non-numerical data certainly wouldn't have to be calculated and could be filtered out when calculating averages and other numerical operations.

Thanks

View 2 Replies View Related

General :: Look Up Wizard Displays Numerical Value Instead Of Text

Mar 19, 2015

I am having some problem regarding the way the options in a lookup field is displayed. Currently the options are displayed numerically instead of displaying the actual text.

I have three tables which are ContactPersonnelT, OrganizationT and TrainingDonorT.

One of the fields in the ContactPersonnelT table is, Affiliation. This field is a lookup value (look up wizard) which comes from the OrganizationT table field, OrganizationName.

In the TrainingDonorT table I have a field called, ContactPersonnel. This field is a lookup value which comes from the ContactPersonnelT table field, ContactPersonName. In the drop down list of the ContactPersonnel, besides the ContactPersonName. I also want to display the Affiliation field. However, instead of displaying the text in the OrganizationName field, a numerical value is showing.

How to change the display to text instead of the numerical value.

View 5 Replies View Related

Forms :: Cascading Form - Numerical Order ID

Apr 2, 2014

I have a problem with a cascading form, which writes back to another table. The scenario is:

There are three tables. Users, Departments & SubDepartments.

Each table has an Autonumber set as the primary key .

The form is to write back to the user table, and within the user table there is a Department & SubDepartment field. These are linked to the relevant tables and all that works.

For the form I have two combo boxes for Department and SubDepartment. Department simply pulls from the Departments table and displays/writes back to User table correctly.

The SubDepartment is the one I am having problems with. I have got it to cascade correctly but here is the exact issue:

On the existing records the subdepartment is being displayed as a number (the primary key autonumber). The drop down list displays the text of what the subdepartment is (which is what I require) but then when that is selected it throws up the error that the value entered isn't correct for that field. I guess it's because it wants to write back the numerical record ID rather than the text from the other field.

The row source query is SELECT [qrySubDepartment].[SubDepartmentName] FROM qrySubDepartment ORDER BY [SubDepartmentName];

The table fields for the subdepartment table are SubDepartmentID, SubDepartmentName, DepartmentID and SDID.

SDID can be ignored for the purpose of this question and DepartmentID links back to the main department. Just to confirm visually the cascading form does work in terms of when you pick a department it only displays the subdepartments associated to it.

View 2 Replies View Related

Convert Date To Its Numerical Equivalent In A Query?

Sep 23, 2014

How can I convert a date format to it's numerical equivalent inside of a query? For instance, 1/1/2014 to be 41640.

View 2 Replies View Related







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