Queries :: Field Extracts Value From Another Text Field

Sep 5, 2013

I'm building a query from tables and there is a field i called it: Weight, that should contain the value from the Description field. The Description field is a text field and it always end with the format as --T, with -- as number, and it can be either 1 or 2 digits, no more.

For example: 2T, 48T, 2T, 36T

So, the whole Description field value is always like this: Bla bla bla 2T, OR: heheheheh 24T

The thing is before the --T, sometime people put in 1 space, 2 spaces or multiple spaces, for example:

This is a test [space]6T
This is a difficult test [space][space] [space] [space] 52T
This is an easy test [space] [space] [space] [space] [space] 40T
I hate taking test [space] [space] 1T

So the field Weight should contain the value 6T, 52T, 40T, 1T only

View Replies


ADVERTISEMENT

Queries :: Changing A Text Field Into A Number Field Using A Query

Jul 31, 2014

I currently import data into a table and it it has a text field which looks like this: 12,345.67 GBP...I need to use a query to make this a number field so that I can sum it's contents. I've managed to remove the 'GBP' part but can't seem to get rid of the comma?

View 4 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

Queries :: Return Yes Or No If Other Text Field Contains Particular Text

Feb 18, 2015

Produce a query that returns a yes or no (Y or N) field if other text field contains particular text (with wildcard on either side).

Idea is to have a column for each preset word.

View 2 Replies View Related

Queries :: SQL Text Field Comparison

Dec 13, 2013

I am comparing the columns in two tables in a JOIN to see if there are differences. The columns, COL3 and COL4, are "Text" fields. They are declared as:

Field Size = 255
Default Value = "" (an empty string)
Required = No
Allow Zero Length = Yes
Indexed = No

I use the SQL comparator <> in my test... so ...

Code:
SELECT * FROM
Table_A AS Tgt
LEFT JOIN Table_B AS Src
ON (Src.Col1 = Tgt.Col1 AND Src.Col2 = Tgt.Col2)
WHERE Src.Col3 <> Tgt.Col3 OR Src.Col4 <> Tgt.Col4

I expected that where Src.Col3 was set to 0 (the string character zero) and Tgt.Col3 was set to the default of "" (a zero length string) that the query would return that row? It does not however? No doubt this is tied in with the old NULL string and Empty string chestnut?What is the best way to compare "text" fields in Access.

View 8 Replies View Related

Queries :: Return / Extract Just Text From Field

Aug 5, 2013

I have a field which contains "01501 PRIKLJ. VRHNIKA - LJ / Stevno mesto" .

1.) I would like to extract just text part from that field, how? *number is always on beginning but different 1-10000

2.) Optional, how could I delete in this new only text field part of text after / ...*some rows have some dont /

View 1 Replies View Related

Queries :: Search For Certain Text In A Field And Return Value

Jan 1, 2015

I am trying to search for specific text in a field and returns its value. For instance some of string includes Sub, L2L, Temp, Model, or MTM and I would like a query to return these values if found.

View 2 Replies View Related

Queries :: Splitting Text Field Into Columns

Feb 15, 2014

Is there a function or query that I can split a field into different columns?

For example, I have First Name, Last Name, Address.

But I want to split the address field into Address1, Address2, Address3, Address4 as the initial Address field has a lot of characters with commas e.g. 11 London Road, Liketown, Likeshire, London.

So, I want to be Address1: 11 London Road, Address2: Liketown, Address3: Likeshire, Address4: London.

I thought that I can export the field using a simple query and then re-import it with using the text field into columns option, but it is time consuming.

View 2 Replies View Related

Queries :: How To Add A Text Line To A Query Field

May 18, 2013

I have a combo box that gathers data based on a query. Is it possible to add a line of text to be displaed every time i pull down the box?

For example I have:

Data1
Data2
Data3

I would like to have:

Not In List (the added txt)
Data1
Data2
Data3

View 2 Replies View Related

Queries :: Performing Keyword Searches Of Text Field

Nov 16, 2014

I am trying to perform some keyword searches of a text field. My preferred option would be to hold all the keywords in a separate table and then use something like

SELECT * FROM Text Table, Keywords Table WHERE (((InStr[Text Table].[Text],[Keywords Table].[keywords])) > 0 ));

This works and returns anything which has the string from the keyword table, however I wanted to look for whole words only. I can do this in SQL using a regular expression along the lines of [!a-z] keyword [!a-z] which only finds the string where it has no letters directly either side of it.

What I would like to do is combine the two methods so I hold my keywords in a table and then use them with the reg ex to find whole words only.

View 6 Replies View Related

Queries :: How To Insert Data In Text Field At The Beginning

Sep 21, 2013

I created an update query to a text field in a table. However, it inserts the data at the end of the string and I need to insert it at the beginning of the string that already exists. How do I move it to the front instead of the end?

This works but puts it at the end:

[Field Name] & "BlahBlah"

View 4 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

Queries :: Running Total With Text And Date Field?

Jun 19, 2013

I have a table ("tbl_idq_all") with a text field for product codes ("scode"), a date field (dd/mm/yyyy) and a quantity field ("po_qty"). This table therefore holds future receipts of stock for products.

What I am having trouble doing is create a running total of [po_qty] based on [scode] and [Date].

A good example is stock code 10254. This has a quantity of 40,032 arriving 01/06/2013 and a quantity of 30,096 arriving 01/09/2013.

Therefore the running totals should read:

scode | Date | po_qty | RunningTotal
10254 | 01/06/2013 | 40032 | 40032
10254 | 01/09/2013 | 30096 | 70128

As you can see from the attached DB I have 70128 repeated twice in the RunningTotal column.

View 8 Replies View Related

Queries :: Format Field As Password Or Hidden Text

May 22, 2014

I have a query that I am sending as a spreadsheet to various service technicians listing parts that they need to take inventory of. Then, after they take the inventory, they send the spreadsheet back to me and I upload their counts back into my database. Right now, my query contains the Bin number, part number, part description, and a blank column for the technician's count. I have just learned, that the company does not want the Bin number to be visible in the report. In order to upload the technician counts into the database when they return the spreadsheet, I need to be able to reference the Bin number to get the count on the right line.

Is there something that I can do so that the Bin number will be visible in the report when the database reads it, but not to the technician?

The only solution I could think of was to format the Bin Number as a password. Unfortunately, I can't get that to work in the query results. If I save the bin number as a password in the table, is there a way to make it visible on reports for internal use (so the people in headquarters who are responsible for over all inventory can still see each bin number)? I found how to hide the field in the query results. However, when I send the results to the technician, the field is not there at all.

View 5 Replies View Related

Queries :: Getting A Text Field Count From Multiple Tables

May 16, 2013

I am working with 4 tables and I am trying to get a count of the email address field in each table grouped by Email Group Name. I tried the dcount function but returned an error because some of the email addresses have an apostrophe in the field. Is there a way to do this in 1 query? This is an example of the result I would like:

EmailGroup/TtlEmailSents/TtlEmailsOpened/TtlEmailsClicked/TtlFormSubmits
AAA 50 30 15 10
BBB 100 75 50 20
CCC 60 25 5 1

Tables:
Emails Sent
Emails Opened
Emails Clicked
Form Submits

Field Names in all tables:
Email Group Name
Email Address

Field I want to count is Email Address for each table, grouped by Email Group Name.

View 5 Replies View Related

Queries :: How To Add Populated Text Field At Make Table Run

Nov 3, 2014

I can add to my make table query UDate: Date() that will add a populated field to the output table that has today's date in it.

I can also add something similar like this for example V_Num: [V_Number] and when ran, will prompt with a dialogue box to add some data, it will then create the table with that new field name and populated with the text from the dialogue box.

But how can I automate this to skip the dialogue box and just add it to the expression?

View 3 Replies View Related

Queries :: IIf Formula With Text Field In Query Not Working?

Apr 23, 2014

I got a table salaries master I want to extract some info out of and calculate some values. The formula below doesn't work, I'm pretty sure it has to do with [pay period] being a text field. Is there no way to make it work?

'Gross monthly Salary: IIf([Salaries Master]![Pay Period] = "weekly";[Salaries Master]![Daily Wage]*5*52/12,IIf([Salaries Master]![Pay Period] = "monthly";[Salaries Master]![Daily Wage]*20))'

View 10 Replies View Related

Queries :: Update Fields By Splitting Text From Other Field

Nov 28, 2014

I have one field called FULL_ADDRESS. From that field I am going to populate two other fields. One called ADD_1 and the other, ADD_2.

In the FULL_ADDRESS field I have the following text :

"BOX 2747 ROCKY MOUNTAIN HOUSE AB T4T 1L7"

I want ADD_1 updated to:

"BOX 2747 ROCKY MOUNTAIN HOUSE AB"

and ADD_2 updated to:

"T4T 1L7"

While I understand how to do an update if I was using a space as a reference, i.e.

Trim(Left([FULL_ADDRESS],Instrrev([FULL_ADDRESS]," ")-1))
Trim(Mid([FULL_ADDRESS],Instrrev([A]," ")+1))

I can't figure out how to skip the first space from the right, and reference to the second occurring space, so that I get "T4T 1L7" to populate the ADD_2 field, and everything to the left of "T4T 1L7" placed in the ADD_1 field.

View 6 Replies View Related

Queries :: Limit Query Results To Numeric Value Of Text Field?

Aug 18, 2014

I have a table that has several fields including CallID (autonumber) and SKU (text)

SKU can be anything up to 9 characters, sometimes numeric sometimes alphanumeric. For example: 24300, AA23145, G58d444, 24999, 89332,...

Based on the Count of CallID I can easily get the top20 calls on each SKU. This is the query I use for that:

Code:
SELECT TOP 20 Count(Calls.CallID) AS CountOfCallID, Calls.SKU
FROM Calls
GROUP BY Calls.SKU
HAVING ((Not (Calls.SKU) Is Null))
ORDER BY Count(Calls.CallID) DESC;

The problem is that now I have been asked to create two different lists. One that has the top 20 SKU that range from 24520 and 24599 and another one that does the res tof the SKUs.

Obviously my problem is that the SKU field is text, not numbers so I can't just limit the results in the query by using "Between 24520 and 24500" in the query criteria.

View 7 Replies View Related

Queries :: Comparing A Text Field In A Table To Textbox On A Form

Jul 8, 2013

I have a table that has a date field set to text. I use the Mid function and get just the month in a query. I have a textbox on a form that when the user adds a month or removes a month from a selected listbox it adds or removes that months number from the textbox.

I want to us that text box on the form as the criteria for the month (the Mid function getting the month) and I can seem to get it to read what's in the textbox and use it as the criteria. I can manually type in a number and it works fine.

View 6 Replies View Related

Queries :: Unable To Find Missing Sequential Numbers In A Text Field

May 5, 2013

I am trying to create a query to find missing sequential numbers in a text field. I am using this specific field as a case number which is designated as two letters, the # sign, two digits indicating the year, a dash, and then a four digit number; For Example: AB#13-1234.

The reason for this query is to tell the user of this database that a specific case number has yet to be entered and needs to be. The case numbers are unique and will never be referenced more than once.

My table name is "MainDataTbl" and the field i'm trying to find the missing case numbers is titled "CaseNumber".

View 9 Replies View Related

Queries :: Importing Excel Text Field Into A Table - CDate Function?

Apr 28, 2014

I am importing an excel text field into a table. I am then appending the data to another table. I am having a hard time with the Cdate function

Excel Date Field:
YYYY.MM.DD HH:MM:SS

Example Value:
2014.04.21 18:24:30

My Query Code:

NewDate: CDate(Left([DateQ],4)+"/"+Mid([DateQ],6,2)+"/"+Right([DateQ],2))

My Query Result:
4/30/2014

What it should be:
04/21/2014

View 12 Replies View Related

Queries :: Form List Based On A Query Returns Original ID Value Not Field Text

Aug 14, 2014

I have a table x where the field value is selected via a combo box in a form that is populated from another table z.

When I look in x, it appears to have correctly stored the text from z, not the ID number.

I then built a Query, qX, which looks in x and grabs the fields I want. That query shows the text correctly in each selected field.

Now when I build a form, frmQx and use a List control, it displays some of the fields as ID values from the original table z, not the text values.

How can I get round this? I've searched and searched for an answer, sigh. Maybe I'm just not quite certain how to phrase the search.

View 5 Replies View Related

Queries :: Design A Query To Show Only Empty Field As TEXT Fields In Table

Mar 2, 2014

I am just querying a single table, no relationship involved with another table. As you can see form the attached jpeg, the ZIP field in some cases is empty. I would run a search using Is NULL but the field is NOT numerical. It's a long story but I had to make this field a TEXT field. Basically, what statement do I have to insert in the criteria field to just pull up the EMPTY ZIP fields?

View 2 Replies View Related

Convert Text Field To Number Field But Keep Leading Zeros

Oct 3, 2006

I need to convert my text data to a number but when I convert using the VALUE function or use "format cells" to the numbers category, I loose the leading zeros. I need to keep them for sorting purposes.

What formula do I use?

View 6 Replies View Related

Tables :: Input Data From A Field To Another Field With Different Text Type

Nov 3, 2012

From a table I want a text field which has a path to a file to be copied automatically into a another field of the same table with a hyperlink text type...

View 5 Replies View Related







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