Extracting Times

May 17, 2005

I've got a field in a table called GenTime. It is in a Date/Time format, like 5/16/2005 7:00:00 PM.

What I need to do is extract from this field the time, like 7:01:00 PM to 7:59:00 PM. I just can't seem to make it work?? :(

Help!

View Replies


ADVERTISEMENT

Extracting First Name And Surname

Jan 12, 2006

Hi,

I have been sent a file of customer contacts. They are held in a single field and have the format firstname + surname. So that I can load this data into a enterprise database system, I need to be able to extract surname and first name into to separate fields.

Any ideas on how I achieve this through an Access query?

Many thanks

Clay

View 2 Replies View Related

Extracting A Substring

Mar 1, 2007

Hi Everybody,
I have an access database and in a certain table I have a string field which has two values. I want to make a query that will show all the fields which contain a substring.

I'd better give an example:

Table: Kid

Fields:
Name: Ben
Activities: Soccer, Tennis

Name: Dan
Activities: Soccer

Name: John
Activities: Football, Origami


.
.
.

I want to show in a query all the Names which have a "Soccer" substring in their Activities string field

Need your help ASAP !!!

View 3 Replies View Related

Extracting Odd/Even Or Both Numbers

Sep 19, 2007

Hi all,

In my query I can query for ODD or EVEN Street Numbers using the syntax below:

OE: [PROPHOUSENUMERIC] Mod 2

This works fine returning just odd or even numbers.

Now the problem I am facing now is that I wan the same query to return both Odd and Even Street numbers if I did not ask for either Odd or Even Street Numbers.

Is this possible. I have search hi and low in the forum but no answer. I have attached the file I am working with this post.

Thanks in advance.

matomo :confused:

View 2 Replies View Related

Extracting Duplicates

Aug 19, 2004

Can someone help me out with writing the expression to pull out the IDs that are duplicates?
I know it is something like count >1. thanks!

View 1 Replies View Related

Seeking Help On Extracting Letters From Name

May 5, 2005

Hi all: MS Access 2003. I have two text fields family_name and given_name I need to extract 1st, 2nd & 5th letter of family_name along with 2nd & 3rd letter of given_name to form a link_key field. If either name has insufficient letters the missing letter is replaced by the numeral 2. Does anybody know how to help me acheive this please!

View 2 Replies View Related

Extracting Month From A Date

Jun 15, 2005

Hi,

I have a date field in one of my queries (01DEC2004). I have a pivot table linked to the query. I would like the users of the pivot table to be able to group the data by month. Currently the group feature will not work. Does anyone have a suggestion on the best way to extract the month from the date field?

Could I create a new column in the query called month and use an expression to extract the month?
If so can someone tell me how to key the expression to do this?

Thanks for any help.

View 1 Replies View Related

Extracting Range Of Records

Jul 4, 2005

Was just wondering how i go about pulling out a range of records. I do not want to use my Primary Key autonumber value as some records have been deleted and selecting a range of 10 to 50 for example will not guarentee 40 records. Is there some way i can use an SQL command in the SQL View window to achieve this?


Cheers

View 3 Replies View Related

Extracting Part Of A Field

Jul 27, 2005

I found a thread from last year that is close to solving this question but not 100% so I'll post this new thread.

I have a field called ITEM_NUM in a database with the following structure:

XX-YYYYYYYYY
XX-YYYYY
XX-YYYYYYYYYYYY

I need to extract the Y portion of the data and a Query format would be the best.

FYI, the X portion consists of 2 Letters/numbers then the Hyphen and the Y portion is variable in length.

thanks for your help!

View 1 Replies View Related

Extracting Data Into A New Field

Dec 13, 2005

You guys have been so helpful in the past. Perhaps you can help me with this as well. I believe it’s a bit out of my scope. I have a list that reads similar to this:

Field 1

DMA: ALBANY
CAR 1
CAR 2
CAR 3
DMA: BOSTON
CAR 1
CAR 3
CAR 4
CAR 5
CAR 6
DMA: HOUSTON
CAR 1
CAR 3
CAR 4
CAR 5

I need it to read like this:

Field 1 Field 2

DMA: ALBANY CAR 1
DMA: ALBANY CAR 2
DMA: ALBANY CAR 3
DMA: BOSTON CAR 1
DMA: BOSTON CAR 3
DMA: BOSTON CAR 4
DMA: BOSTON CAR 5
DMA: BOSTON CAR 6
DMA: HOUSTON CAR 1
DMA: HOUSTON CAR 3
DMA: HOUSTON CAR 4
DMA: HOUSTON CAR 5

If my list was this short, I would do it all manually, but my record list is in the 10,000s. Basically I want field 1 to read: DMA:ALBANY and Field 2 to read:CAR 1, and so on. I’ve tried linking the table to itself in a query, however, that hasn’t proven to be helpful. I've also searched the FAQ's and newsgroups. Any insight would be appreciated.

Thanks,
Amanda

View 3 Replies View Related

Extracting First 2 Characters From VAT Number

Dec 20, 2005

Hi,

I have a long list of customers / suppliers and their VAT numbers. I would like to create a query that shows only the customer/supplier number and the first 2 characters (countrycode) from their VAT number. for example

Supplier 3 VAT number NL80980808
endresult should show:
3 NL

Is there anyone that can help me out??

View 1 Replies View Related

Extracting A Portion Of Data

Oct 3, 2006

I probably have an easy question for one of you out there, but I just cannot get it myself.

I need to extract the data between two characters in a string.

The data will be similar to this:

T4454: Text Text-Text: $296.07: Text Text

I need to get the dollar amount between the dollar sign and the colon on the right of it.

So far, I have this for my query:

Amount1: Mid$([subject],InStr([subject],"$"))

Which gets the amount to the left side, but also has the $ in it.

In the example above, I would like to just end up with 296.07 as the result from the query. I should also add that the dollar amount may vary from 1.00 to #,###.00

Thanks in advance for any help you can provide

View 5 Replies View Related

Extracting Random Records

Nov 3, 2006

If i have a table with several records let's say 1000 records, and each record has a field called cboCategory. Now from these 1000 records, lets say i have 200 records which has a value of CategoryA in the cboCategory field. Now is it possible that i extract "randomly" a number of records from that particular category chosen.

e.g.

Table -> 1000 records

records which belong to categoryA -> 200

extract 20 random records from the table which have a value of categoryA inthe cboCategory field.

Thanks for any suggestion.

View 5 Replies View Related

Extracting Data From Combo Box

Aug 1, 2006

Hi,
I have a combo box, which the first and last name of an employee is combined using trim. Does anybody know of a way to seperate both fields as these would be used an a query so I would need them seen as 2 fields otherwise there won't be any matches.

Cheers,
Ben

View 1 Replies View Related

Extracting Data From A Table As String

Nov 15, 2005

I need to be able to extract individual fields from a table as strings in order to then send this data to my EPOS printer (which will accept only strings to print) I have created the table with a query so the question could equally be how can i output strings as query results. Im using Access97 HELP!!
I have tried to set up a ADODB.Connection but either Access 97 wont accept it or i've got the coding wrong

View 3 Replies View Related

Extracting Data From One Field In A Table To Another--Help!!!

Jun 27, 2006

Hi Guys,

I have a table called "tblEmployees" with the following fields:
EmployeeNo (Primary key)
Name
Address
DOB etc
Letter1Dated
Letter2Dated

I have another couple of tables:

"tblLetter1" with the following fields:
EmployeeNo (Primary key)
Name
Letter1Dated
Letter1RemainingFields...

"tblLetter2" with the following fields:
EmployeeNo (Primary key)
Name
Letter2Dated
Letter2RemainingFields...

I want to be able to put the data from 'Letter1Dated' field (from the "tblLetter1" table) into the 'Letter1Dated' Field in the "tblEmployees" table.
Likewise, I want to be able to put the data from 'Letter2Dated' field (from the "tblLetter2" table) into the 'Letter2Dated' Field in the "tblEmployees" table.

All three tables have the same primary key (EmployeeNo), which makes it even more difficult to do this!
I understand this may sound abit confusing so i apologise for this.

I would really appreciate it if anyone could point me in the right direction please.

Thanks alot.

View 4 Replies View Related

Extracting Data From A Field In A Table.

Jan 29, 2007

when I have created my table I have created a field called name that stored both last and first name. Right now I need to extract the the last name from the the field name and store it in another field "lastName". Any ways to do that?

View 7 Replies View Related

Extracting Info From Two Date Columns

Nov 9, 2005

basically I have two date columns in one of my tables. One is created whenever a record is created in that table the other is added to that record later based on business rules. I need to get all records in the table where the first date exists but not the second. I'm unsure of how to write a query specifying that the second date column must be empty.

View 1 Replies View Related

Extracting Numbers From A Memo Field

Mar 15, 2006

Hi all

I have a field on a database thats generally used to enter notes.
Within these are mobile phone numbers in no particular order(throughout the field)

Im not sure what the code is to enter in the query to display only mobile numbers from this notes field ?

Any help will be appreciated

Thanks

View 1 Replies View Related

Extracting Record(s) With Most Recent Date

Jul 29, 2006

I have a database table comprising inspection records for about 300 process control instruments. A new record is entered for each inspection so that an inspection history builds up for each instrument.

For one report I need to extract all the records with the only the latest inspection date for each instrument.

I attempted to build a query using the design grid screen. Initially I thought I could use the "Max of" approach as I have done with numbers. This did not work so tried without success to convert the dates to serial format thinking I could "Max of".

Have now concluded that a module is needed. However with my Access Basic programming skills this would take me a couple of weeks and still be wrong!

Can anyone point me in the right direction?

View 12 Replies View Related

Extracting Records From A Memo Form

Aug 25, 2006

I need some help. I created a database to capture information from an employee survey. Most of the answers required a check if they agree or no check if they do not agree. There was one "memo" field inwhich we allow the employee to VENT. I have provided the team with all sorts of reports with percentages and figures. Now they want to remove any comment that had money, pay raise, bonus etc. They also want to organize the comments in some type of flow. Like all the "pats on the back" in one area, Day offs in another, plaque on wall grouped together, etc.

Can one of you experts, please give me some help?

Thanks!

View 1 Replies View Related

Query - Extracting Customers Between Two Dates

Jan 2, 2007

My customer searches hires a car between two dates - StartDate and EndDate. I want to build an expression that searches my database for all the customers currently using cars (using cars on the day of the search.) How can this be done?

View 2 Replies View Related

Extracting Data From A Single Cell

Feb 20, 2005

Hi,

Is there any way that i could extract data from a single cell inside the table to the forms, and vice-versa?

View 1 Replies View Related

Extracting Concatenated Column Data

Oct 23, 2007

Hi, I need a little help. I will give you the background on what i am doing to hopefully make this easier to resolve. P.S I am open to other approaches.

1) Items are requested for order indervidually

Table/Query looks like this

Code:ID#PartNumberStatusQty ReqOrder StatusNeed DateWork Order110-980-21Stock Required2Waiting26/10/2007WO07-12CR212-5-3Stock Required30Waiting26/10/2007WO07-1310-980-21Stock Required1Waiting28/10/2007WO07-24CR212-5-3Stock Required20Waiting28/10/2007WO07-25CR212-5-3Stock Required15Waiting28/10/2007WO07-2

2) The following Module concatenates the columns (my idea being the user can order all items in bulk.

Code:Public Function Conc(Fieldx, Identity, Value, Source) As Variant Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset Dim SQL As String Dim vFld As Variant Set cnn = CurrentProject.Connection Set rs = New ADODB.Recordset vFld = Null SQL = "SELECT [" & Fieldx & "] as Fld" & _ " FROM [" & Source & "]" & _ " WHERE [" & Identity & "]='" & Value & "'" ' open recordset. rs.Open SQL, cnn, adOpenForwardOnly, adLockReadOnly ' concatenate the field. Do While Not rs.EOF If Not IsNull(rs!Fld) Then vFld = vFld & ", " & rs!Fld End If rs.MoveNext Loop ' remove leading comma and space. vFld = Mid(vFld, 3) Set cnn = Nothing Set rs = Nothing ' return concatenated string. Conc = vFldEnd Function

3) A query calls on this

Code:SELECT Conc("ID#","PartNumber",[PartNumber],"Qry_70_BOM_Awaiting_Order") AS [BOM ID#], Qry_70_BOM_Awaiting_Order.PartNumber, Sum(Qry_70_BOM_Awaiting_Order.[Qty Req]) AS [Total Qty Required], Conc("Work Order","PartNumber",[PartNumber],"Qry_70_BOM_Awaiting_Order") AS WOrdersFROM Qry_70_BOM_Awaiting_OrderGROUP BY Qry_70_BOM_Awaiting_Order.PartNumber;

Producing this result.

Code:BOM ID# PartNumberTotal Qty RequiredWOrders1, 3 10-900-213 WO07-1, WO07-22, 4, 5 CR2162-5-365 WO07-1, WO07-2, WO07-2

OK, Now after that, (ALL ABOVE WORKS FINE).

I would like my users to purchase againts the new BOM ID# records as seen above. Once a order is placed against these i will, put something against each records to show there order status. (i'll take care of this part.)

Code:BOM ID# PartNumberTotal Qty RequiredWOrders Order Status1, 3 10-900-213 WO07-1, WO07-2 Waiting2, 4, 5 CR2162-5-365 WO07-1, WO07-2, WO07-2 Ordered

Finally, sorry about the lenght of this, I need to be able to use the above BOM ID# to reference back to the the ID# table at the start of the thread. In this example Id's records 2 - 4 and 5 will show ordered.

In other words how do i extract 2, 4, 5 back out of the above and into there original state, but including the order status?

Hope this makes sence

View 1 Replies View Related

Queries :: Extracting Data From A Query

Jun 19, 2015

SELECT tblLeaveBalance_Cashables1.Facility, tblLeaveBalance_Cashables1.Division, tblLeaveBalance_Cashables1.Position, tblLeaveBalance_Cashables1.Name, tblLeaveBalance_Cashables1.[Class Code], tblLeaveBalance_Cashables1.Class_Title AS Classification, tblLeaveBalance_Cashables1.CBID, tblLeaveBalance_Cashables1.[SS Months], tblLeaveBalance_Cashables1.Age,

[code]....

I need to extract data that where vacation time is >640 or annual leave is >640 and where personal Hol hours are >24 and CBID is M06,S06 and R06.

View 4 Replies View Related

Modules & VBA :: Extracting A Field From Recordset?

Nov 11, 2014

Is there a possibility to use a shorter code for extracting one field from one record, than opening a recordset, getting the field, closing it and setting the recset to "Nothing" again? I'm doing this multiple times in my code and it seems a bit too much for what it's supposed to do.

Code:
sql = "SELECT tblAdFlgDaten.* FROM tblAdFlgDaten WHERE (((tblAdFlgDaten.AuftrID)=" & ABAuftrID & _
") And ((tblAdFlgDaten.Schritt)=2))"
Set RSnap = dbase.OpenRecordset(sql, dbOpenSnapshot)
If IsNull(RSnap.Fields(2)) Then
...
...
End If
RSnap.Close
Set RSnap = Nothing

View 4 Replies View Related







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