Parse Query

Aug 18, 2006

I am looking to parse names that go into a table in the field "FULLNAME", but I only want this qry to run if there is 1 space in the field.

UPDATE tblStandardLayout SET tblStandardLayout.FNAME = Left([FULLNAME],InStr([FULLNAME]," ")), tblStandardLayout.LNAME = Mid([FULLNAME],InStr([FULLNAME]," ")+1);


This would be because I dont want it to try to parse names that are not just "First Last"

View Replies


ADVERTISEMENT

Queries :: Parse Data In Query And That Becomes A New Field

May 26, 2013

In a query, I have the following data. If a number has more than six digits, I need to parse past the fifth digit and that becomes a new field. If it has five or fewer digits, no record is entered into Column2. For example:

Column1 Column2
12345
54321
123456 6
12345678 678
123
9876541 41
6

What simple code does it take to perform this in a query?

View 2 Replies View Related

Parse Text

Jun 28, 2006

Hi,

I need to create a query that will parse a word and separate it into a list of letters.
I have had a go myself but am unable to do it... does anyone else know what to do?

Thanks.

View 1 Replies View Related

Please Help String Parse

Nov 11, 2005

Probably very simple but I cannot get the syntax right - it has been far too long since I used Access.

I am trying to seperate a field NAME from these formats:

LAST/FIRST M
LAST/FIRST

To two fields: Field LAST and field FIRST

Can someone please help?

Thank you! It is Friday and I want to go home!

View 1 Replies View Related

Parse A Filed

Jun 24, 2006

I am tring to seperate a field using a query that has data like this:
02 04 08 18 20 25 31 32 35 39 41 45.... (10 sets of numbers)
into there own fields...
I cant seem to find something along those lines!

View 1 Replies View Related

Parse Text

Mar 27, 2008

I am a novice here so your patience and help is very much appreciated.
I am trying to parse text from a field.
Here's an example of the source data (all in "field1"):

Example 1
***** Regular *****
Time..08:19 DATE..03/27/2008
Request NO...20081306101

...and this is how I would like it"
New Field 1: Regular
New Field 2: 08:19
New Field 3: 03/27/2008
New Field 4: 20081306101

Because the values change substantially, I would like to be able to select the data in between two known text strings as opposed to using the MID function, an example of which I have successfully used to return "Regular" is:

MID([field1],InStr9[field1],"*****")+6,7)

But because the values change (e.g. "Emergency") I would rather have the end point based on the string "*****" rather than a count of characters (e.g."7")
Any suggestions?

View 3 Replies View Related

Parse Data From One Field Into Many

Dec 7, 2006

Hi All,

Can someone get me started in the right direction?

I have an unbound field on a form "txtScan". This field is populated by a barcode scanner.

The data looks like this ~Field1~Field2~Field3~Field4~Field5~Field6~Field7~ Field8~Field9
I am using ~ as a delimiter. Since I am encrypting the barcode, I can pretty much do anything to the barcode.

I need to parse
~Field1~ into txtFirstName
~Field2~ into txtLastName
~Field3~ into txtCompany etc.
A key point is that one of the fields may be blank so, if field 2 in the string is blank, "Field2" does not get populated.

I've never tackled anything like this before and don't know where to start.

Any help
TIA

View 2 Replies View Related

Modules & VBA :: Parse UDT As Parameter

Jul 9, 2015

I have a User Defined Type which stores an array..I have 2 instances of this UDT, one storing matched data, the other storing exception data..I was to parse these arrays to an Excel output routine. However, the parameter variable contains no data when accessing it..

Here is my code:

Code:
Private Type TOutputRow
RACFID As String
FullName As String
Access As String
LastLoggedIn As Date
End Type

[code]...

View 7 Replies View Related

Parse Into Report From Subform

Aug 31, 2015

I am attempting to create a report and pass on the information from the current form to it. It is supposed to create a student ID and I am unable to get the information into the appropriate fields.I can get all the info from OpenArgs into one box but it wont parse it all out. The Form is within a navigation form. I know the below option is not the best way to do it, but other options I have found it has issues with sending when the form is within a navigation form and I prefer not to redo the entire thing at this point to remove the Navigation form.

Code:
DoCmd.OpenReport "rptStudentID", acViewPreview, , , , OpenArgs = "lblSSID|" & Me.SSID & "lblFirst|" & Me.firstName & "lblLast|" & Me.lastName & "lblDate|" & Me.dateAdded & "lblImg|" & studentList.Column(4)

The Parsing which is mostly just a copy from the above site

[code]....

View 6 Replies View Related

Separate/Parse Month From Date

Mar 29, 2007

I am having trouble parsing the month from a date like 05/12/2007 and I want to return the leading zero with the month. Example of 05/12/2007 and I want to display 05 only.

Please send any suggestions.

Thank You,
MJ

View 2 Replies View Related

Parse Data Then Search For Delimiter

Sep 10, 2007

Here is what I need to do:
I have 1 table that contains groups responsibilities, there is a field Code-group that the initiator uses to track the groups & their % of impact to the overall project hours. Sadly enough he enters the data as such (EX:
PROJECT1 GROUP1-25%, GROUP2-50%, GROUP3-25%.

The problem is that he has varied instances of groups listed in each record & wants me to be able to parse the data out regardless of how many groups are listed. I know how to parse data when there are a specific number of groups what I can't figure out is how to parse data regardless of how many groups is in the field.

Any help is totally appreciated.

Phoenix

View 4 Replies View Related

Modules & VBA :: Parse HTML Using DOM Without Browser

Jan 27, 2014

If I have an XML file, I can load it into an XML document and parse it.

For an HTML file, I have been unable to find similar parsing methods - that is, using DOM and not involving a browser (other than simply treating the file as text). I'd prefer to avoid the browser control because it is different for a number of different Access versions, so the only option remaining that I see is to run Internet Explorer with visibility off.

Can one parse HTML using the DOM without a browser?

View 8 Replies View Related

How To Parse And Re-Write A Date Field

Jul 8, 2012

I have a Date Field and I would like to complete another field depending upon the contents of that date field.

In this way: if the Date is, say, 4/27/12 I want the other field to read: April 2012 and so on. Reading the month, putting it into words, reading the year, writing it out. This second field is NOT a date field.

View 2 Replies View Related

Parse A String With Years Month And Days....

Dec 4, 2006

Solution to parse the strings below and get number of months
1) 10 years 5 months 5 days - Should give 5
2) 6 years 10 months 22 days - Should give 10

View 2 Replies View Related

Modules & VBA :: Parse Records From Memo Field

Jul 8, 2013

Access 2003

I have a process which imports a txt file into a memo field of my TBLORIGINAL table Each file may have one record or it may have multiple records Every record begins (exactly) with

Quote:

FRE Order Order RAD ShipDate Customer City State Postal Code

For each record in the memo field, I need to create a new record into my TBLPROCESSED table

This can probably be done while it is importing but I need to keep the original file intact

I suppose I could copy and paste but there must a vba way of doing this

View 3 Replies View Related

Can Use A Find Expression To Parse Data In A Table

Jul 9, 2012

I've got a Table with a string of data delimited by an "*". The first part of the string before the "*" can be variable in length, so if I use a LEFT expression to break apart the 2 parts of the string on each side of the "*", my results are incorrect. In MS Excel, I can use the following formula to solve the problem:

=LEFT(B6,(FIND("*",B6)))

You are just substituting the number of positions with a Find command that looks for the "*", and returns anything left of the "*". Unfortunately, the brilliant programmers at Microsoft, once again, don't have an Excel function in Access. how to recreate that functionality in a table in Access?

View 4 Replies View Related

Modules & VBA :: Parse File List And Create PDFs

Jul 5, 2013

I have a spread sheet which on a per line basis contains columns whose cells contain the path to a file. It looks as if many of the files are tif, pdf, word and excel etc, so multiple file types.

Writing a routine which would take each row and then for each line of file paths turn them into one multi-page document - pdf or something?

View 1 Replies View Related

Modules & VBA :: Parse Email Messages - Feed Data To MDB

Jul 28, 2014

I've built an HTML web form that sends an email to me upon submission with all the field inputs. I have previously found success using VBA in Outlook to parse out these emails and feed the substrings into an Excel Sheet (hooray!), but now am looking to feed the substrings into Access, specifically into a table in an existing .mdb file. I figure the way Outlook will "talk to" Access will likely be a bit different from the way it does for Excel.

The way my previous script engaged with Excel was through a rule; every time a new email was received, the following script would run if the message had the subject line generated by my web form. The script would check whether Excel and the target workbook/sheet was open, act accordingly, and then input the substrings (I've excluded that part below), then return Excel and the wb/ws to their initial state. I imagine though, that with Access I might be able to feed the substrings into the .mdb without having to open it proper, the way a front-end talks to a back-end. But perhaps I'm mistaken on that front.

Code:
Option Explicit
Option Compare Text
Public Const xlUp As Integer = -4162 'I genuinely do not know what this is _
about. It came with the initial _
borrowed code.
Public Const wbPath As String = "C:...Workbook.xlsx" 'Workbook path

[Code] .....

View 10 Replies View Related

General :: Parse Substring From Barcode With Variable Digit Count

Aug 23, 2012

I need to identify and parse (substring) a number of digits from a barcode. The barcode digit count will vary, based on the number of details included in the barcode.

For example: the barcode for GS1 DataBar begins with a 4 digit code of 8110 identifying the code as GS1. The 5th digit then identifies the number of digits directly following which constitute the manufacturers code, which can range anywhere from 6 digits to 12 digits. I need to pull the number of digits out of the barcode based on the value of the 5th digit placeholder and pull only that many digits from the string and replace them into another field. There are potentially 70 total digits in the barcode. I have only provided the first section, which I am asking the question on.

Simply put: I need to tell the substring to identify the number to parse from digit 5, (which will have a min of 6 digits and a max of 12)

How do I pull the information out of a string to create a substring in another field by first defining the number of digits to pull out (Digits 6 to 17 min of 6 digits and a max of 12 digits) based on a value within the string (digit 5= value)

So if Digit 5 is 6 the returned value would be: Digits: 6 7 8 9 10 11 (6 6 6 6 6 6 )

If Digit 6 is 9 the returned value would be: Digits: 6 7 8 9 10 11 12 13 14 (9 9 9 9 9 9 9 9 9)

The first portion of the barcode is below: There are other pieces necessary to be pulled the same way, but from other sections, and based on yet another X desinator field (the next with a min of 1 and max of 5) I assume the pull would be similarly completed.

I don't know how to write code, I have used formulas but not this detailed or specific.

Ex: I know = Min (barcode, 5, 6) would pull the 6 digits after the 5 spot, but how do I vary the 6 (count) number in the formula?

Example below: No additional spaces, dashes, letters etc. (A's = 1-4, X = 5, M's = 6-17)

A A A A X M M M M M M M M M M M M

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

View 2 Replies View Related

Parse InStr "-"

Mar 13, 2008

Hi, i have a column with data in a query that looks like the following (p.s. sbenj, mehere,.. thanks for the advice earlier)
Code:Link200-1200-1-1200-1-2200-13-1
Now everything before the 2nd hyphen is considered the base number. I.e.

Code:Link200-1200-1200-1200-13
I need to parse into a seperate field everything before the 2 hyphen.

Now i've tried the following which i thought would work, which would enable me to concatenate expr1 & expr3 unfortunately it doesn't agree with 200-1 because it doesn't have a second hyphen,

SELECT Table.Link, Left([link],InStr([link],"-")-1) AS Expr1, Mid([link],InStr([link],"-")+1) AS Expr2, Left([Expr2],InStr([Expr2],"-")-1) AS Expr3
FROM Table;

Result from this is

Code:EXPR1 EXPR2 EXPR3200 1- Error#200 1-1 1200 1-2 1200 13-1 13

Any Thought?

View 11 Replies View Related

Query In Forms Question (printing A Single Selected Query Record From A Form?)

Oct 19, 2004

What is the best way to impliment a query in a form so that the user can view the query records, and have the option to print or save the selected record using command buttons?

I tried subforms but I could not get the command buttons to work in the subform after it went into the form, it wanted to print the entire form instead of the selected record from the subform.

So in a nutshell I have 3-4 queries that are built, and I want to have them show up on my form in a format that the user can scroll through the results and select a single record of the results and then print or save that individual record from the form, if such a thing is possible.

Thanks in advance

Todd

View 1 Replies View Related

Queries :: Join Results Of Unmatched Query With Matched Query To Include Null

Mar 24, 2013

I am trying to do the good 'ol sales report (query) to include customers with no sales.

I have a customers table, account number table, sales table & sales (line) detail table. (all linked in that order)

If I run a query to show customers (in the customer table) with account numbers, that works

An unmatched query to show customer without an account number works (but of course the unmatched account number field isn't shown).

How can I get the two two be shown together with the "unmatched" having a null or 0 for their account number?

I am guessing in principle, the resulting solution can be modified to show customers without sales alongside those with sales?

View 3 Replies View Related

Queries :: Opening Design View Of Append Query Without Timing Out Source Query

Mar 4, 2015

In some cases I create pass-through queries and use these in an Append or Make-table query to bring data locally.

All is well and fine until source data changes and the pass-through query runs too long and times out.

If needed, I can extend the timeout value in the Parameters of the pass-through query no problem, but when I try to open the Append or Make-table query in Design view to do the same, the pass-through query is first triggered and then throws the timeout, and I cannot access the Design view of the Append or Make-table

Is there a way to open an Append or Make-table query in Design view without invoking the source query?

View 1 Replies View Related

UNION Query MS Jet Database Engine Cannot Find The Input Table Or Query.

Oct 28, 2005

Hello All,

I'm trying to run a UNION query that joins five queries through a MS WorkSpace into a DAO.recordset in VB. I'm pulling the data from a SQL Server Database through VB in Access. I'm attempting to open a recordset with a query passed to it as a string. The query is below. For some reason, I'm receiving a message: "MS Jet database engine cannot find the input table or query. Runtime Error 3078".

Here's what's puzzling. When I run a single query without any UNION statement, the code finds the table and runs fine without error, but anytime I join two or more queries with a UNION statement in the VB, it gives me the error.

I've executed the same UNION query in both Access Query Builder and SQL Server's Query Analyzer and they work fine in both environments. It's only when I call the query from a DAO.Recodset with VB that it causes this problem. The following is a sample of the UNION query joining two of the five queries. Does anyone have any idea what could be the problem? The following query executes in about 5 seconds so I don't think there's a "time-out" issue. I'm thinking that the UNION statement may be the culprit. Maybe there's another way to approach joining these separate queries? Any help would be most appreciated. Thanks.

SELECT SalespersonID, Sum([SlsPrice]-[RtnPrice]-[SlsDiscnt]+[RtnDiscnt]) AS fldPrice FROM MyTable WHERE (((Source)='d') AND ((DistrictID)='01') AND ((CategoryID) = 'HCPROD') AND ((BrandID)<>'CSS')) AND (((BrandID)<>'1356')) AND (((BrandID)<>'1400')) AND (((BrandID)<>'1551')) AND (((BrandID)<>'555')) AND (((BrandID)<>'66'))
AND (TransDate >= 07/01/2005) AND (TransDate <= 07/31/2005) GROUP BY SalespersonID
UNION
SELECT SalespersonID, Sum([SlsPrice]-[RtnPrice]-[SlsDiscnt]+[RtnDiscnt]) AS fldPrice FROM MyTable WHERE (((Source)='d') AND ((DistrictID)='01') AND ((ProductID) = '0029800')) AND (TransDate >= 07/01/2005) AND (TransDate <= 07/31/2005) GROUP BY SalespersonID

Set wrkJet = CreateWorkspace("", "pw", "", dbUseJet)
Set db = wrkJet.OpenDatabase("DW", _
dbDriverNoPrompt, True, _
"ODBC;DATABASE=DW;DSN=DW2")
'Set rs1 = db.OpenRecordset(strSQL)

View 9 Replies View Related

Queries :: Export Query To Excel Then Delete Query Data From Table

Nov 20, 2013

I am wondering if there is a quicker way to export a query to excel then have the data in that query removed from the original table. (effectively cutting the data from the table and exporting to excel)

I understand that this can be done by exporting the query to excel then running the same query as a delete query to remove the data but I just wondered if this is the most efficient way.

I have experience of VB in excel but currently only use the basic macro builder in Access though if Access VB is more efficient I can easily learn.

View 5 Replies View Related

Queries :: Update A Query Based On Results From Another Query Using Count Function

Apr 2, 2013

I run a physical therapy office and patients come in for treatment either 3, 4 or 5 times per week. My database is used to track these frequencies (among other things).

I have 3 queries which count how many patients come in 5, 4 and 3 times/week.

In my main table I have fields called "how many 5's", "how many 4's" and "how many 3's".

I have tried to design an update query which will update those fileds in my main table to reflect the counts in the 3 queries mentioned above.

(I'm not using SQL view, I'm using the query design view)

In the "update to:" row, I use the Build function and locate the count I'm looking for.

Problem: when I run the query I get the error: Operation must use an updateable query.

View 3 Replies View Related







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