Concatenate 3 Rows Into Single Header Row

Jan 31, 2014

A third-party application I use exports data with 3 header rows. I usually have to go into Excel and concatenate the rows into a single header row, then export the file to Access to apply queries. I want to minimize the steps in this process, so I'm wondering if it's possible to do this concatenation in Access (with or without VBA).

View Replies


ADVERTISEMENT

Modules & VBA :: Concatenate Data From Multiple Rows Into Single Row / Field

Nov 4, 2013

I use following function to concatenate data from multiple rows into a single row/field. It puts a comma ',' after each concatenate. What I would like it to do more is to put 'and' instead of comma between the last two concatenated words. For example: Now it gives me Value 1 but I want to get Value 2.

Value 1:
FormRegNo CombinedParticipants
DC-190 Political parties, CSOs, community residents

Value 2:
FormRegNo CombinedParticipants
DC-190 Political parties, CSOs and community residents

Function:
Option Compare Database
Option Explicit
Public Function ConcatField(strSQL As String) As String
Dim dbs As Database
Dim rst As DAO.Recordset
Dim strConcat As String

[Code] ....

View 2 Replies View Related

Concatenate Into A List In A Single Field

Jun 29, 2007

To anyone who can help,
I have created a function that loops through an amount of records and concatenates them into a single comma-separated string. What I would like to do is concatente the values into a list. Instead of:

value1, value2, value3

I would like to see

value1
value2
value3

This needs to be in a single record only. The code I am using is:
----------------------------
while not rec.eof
string = string & ", "
rec.movenext
wend
string=left(string,len(string)-2)
--------------------------------

Thanks for all your help. I have tried to insert char(20), but this only seems to work in Excel. Access gives me invalid char symbol.

View 1 Replies View Related

Concatenate Results Of A Single Column Query

Mar 14, 2007

I have a query which select the records who have a certain criteria.

The result is something like this.
A 0012345
A 0032432

Note that the records that have this criteria will be smaller or equal than 2.

I want the query to give me this answer instead.
A0012345, A 0032343
(in the same field that is).

Is this possible, if so can someone help me. My email address is russcami@yahoo.com

Thanks

View 2 Replies View Related

Queries :: Concatenate Multiple Rows Without VBA

Sep 23, 2014

I am trying to concatenate multiple rows into one record. I googled it and found many functions in VBA that do the job. However my problem is that my query will be linked directly to Excel file and then I get an error message saying that Excel could not recognise this function. I could potentially insert data into new table and link that table to Excel but I need to avoid end-user exposure to Access as much as possible.

So I am desperately trying to find a way of doing this without VBA code.

Example of data:

Customer Name |Order Number
Smith |O101
Brown |O102
Smith |O103
Green |O104
Brown |O105

I am trying to achieve below:

Customer Name |Order Number
Smith |O101, O103
Brown |O102, O105
Green |O104

View 14 Replies View Related

Modules & VBA :: Concatenate Multiple Rows Into One Field

Nov 16, 2013

I have a table:

"tb_skybox_Types", with the fields, [Policy_URN], [Box_Type]

Sample:

Policy_URN Box_Type
001 Standard
001 Sky HD
002 Sky +
002 Sky + HD

I'm mail merging this, so naturally it's giving me a row per box type against which I need to be one. Desired output:

Policy_URN Box_Type
001 Standard | Sky HD
002 Sky + | Sky + HD

I'm then going to make this into a temp table, then match the URN back to the customer table to get a single row per customer.

View 3 Replies View Related

Reports :: Concatenate Multiple Rows Into 1 Field

Jun 18, 2013

My database has a 'markets' table, where there could be multiple markets per campaign.

So right now in my report, it's displaying like this

campaign 1
Market 1
Market 2
Market 3
Etc.

Is there a way, to Concatenate multiple rows into 1 field. So it would look something like this

Campaign 1
Market 1, Market 2, Market 3

That would save a lot of space in the report, and make it easier to read.

View 11 Replies View Related

Forms :: How To Join (concatenate) Records Of Values In Single Line

Jan 15, 2015

In Access 2013 I have a query that join two tables, Conduminium Owners to their possetions (fractions of conduminium).

Owners.OwnOwners.Vote SumOfTblFracPerc
O; P................................No............... .9,54
F....................................Yes.......... ......5,48
L; Q................................Yes.............. ..7,13
M; U...............................Yes............... .7,86
H...................................Yes........... .....5,71
D; R...............................Abstention......7, 78
etc...

This query is grouping and summing, and I want put the results in a form and see it grouping the fractions in lines like this:

"These were the votes of the owners of fractions:

O;P, voted No = 9,54
F, L;Q, M;U, H, G;W, C, N, I, voted Yes = 37,72
D; R - voted Abstention = 7,78

How can I do it?

View 1 Replies View Related

Queries :: Single Row Data Required As Column Header

Nov 4, 2013

Is there any way I can use data in the row as a column header ? I only have 1 row of data which i want to use as a header to I can link it to other tables/queries.

(Access 2007 query)

View 1 Replies View Related

Forms :: Concatenate Entries From A Single Field Based On Another Field

Apr 11, 2013

I have a datase that has the following fields.

Name
Comment1
Comment2

I have about 36 names and each of those names appears anywhere from 2 7 times each. Each name entry has a comment1 and a comment2.What I would like to do is create a form that allows me to choosea name and the display the comments 1 and comments 2 in text boxes.

I have made the form to allow me to choose a name and it shows one of the comment1 and one of teh comment2 in the adjacent text boxes as planned but, I want all the comment1s for Bob to show in the text box for comment1 and all of the comment2s for Bob to show in the Comment2 text box.I believe I need to concatenate the results in the comment1 and comment2 boxes, but I do not know where or how I would do that.

View 5 Replies View Related

Adding Single Date To All Rows

May 14, 2013

I want create a query that adds a field called DATE to my existing data. I want every record to have a date of 1/1/2011 populated in it. I need it to have date formatting so that I can add/subtract other dates from it.

DATE
1/1/2011
1/1/2011
1/1/2011

How to do this?

View 5 Replies View Related

Forms :: Show Single Form With All Rows From A Table?

Jul 11, 2015

I'm building a simple access database to be used in a factory. It's pretty much there now, in the sense that it does all it needs to do, but some things feel a little "clunky". One of these things is the page where new products are created.

When a product is created the user has to specify what raw materials it's made up of and that works great, there is a continuous sub form that lets the user just add a row for every raw material. Having it as a continuous form makes sense as there can be lots of rows or just a few, so it's flexible.

Currently though the labour/time on that page works in the same way. But it feels a bit silly as there are only 3 sorts of labour (at least currently, they might add a couple more later). The labour types are..

- Build
- Finishing
- Handling

My question is, how would I go about turning the existing continuous row-by-row subform for labour into a single form that just listed those three types of labour (read from my labour type table)? So that it just shows a row that asks for quantity of each available labour type.

Not all products have all types of labour but it would be fine to write a 0 in the labour table for (for example) Finishing against a product that for example didn't need Finishing Labour. Obviously with the current continuous form approach no row would be written for Finishing if the user didn't select that.

I guess I could hardcode a single form to show the three current types, but ideally it would be flexible, coping with new labour types when the users find they need to add them.

View 5 Replies View Related

Export Multiple Rows Into A Single Cell In Excel?

Sep 18, 2012

I need to export a list of data into a single cell in Excel.

As an example the list looks like this in Access:

450a

650b

320c

4100d

and exports into individual cells. I need it to export into one cell and look like this:

450a, 650b, 320c, 4100d

View 4 Replies View Related

Queries :: Return Multiple Rows From A Single Record In Database

Jul 16, 2014

For each record in my database, there are observation periods which are recorded in the format dd/mm/yyyy hh:mm:ss, titles as follows

1st Obs Start
1st Obs End
2nd Obs Start
2nd Obs End
3rd Obs Start
3rd Obs End.

I have been asked to create a query that will quickly show how many obervation periods commenced in a particular month. What I am trying to do is create a column that will be named Obs Start, and another, Obs End. For each record ID, this would then show as follows:

ID......Obs Start.............Obs End........
1....[1st Obs Start].....[1st Obs End]....
1....[2nd Obs Start]....[2nd Obs End]....
2....[1st Obs Start].....[1st Obs End]....
2....[2nd Obs Start]....[2nd Obs End]....
2....[3rd Obs Start].....[3rd Obs End]....
3....[1st Obs Start].....[1st Obs End]....
4....[1st Obs Start].....[1st Obs End]....

etc.

I could then quickly count how many obs periods started within the desired month.

View 14 Replies View Related

Modules & VBA :: Storing A Single Record In A Single Dimension Array?

Sep 8, 2014

Any Single line of code available?

View 2 Replies View Related

Modules & VBA :: Sending A Single Email To A Single Record In A Query

May 15, 2014

I am trying to create a form with a button attached to each record that would allow the user to click the button and it would automatically open outlook and fill in the TO:, SUBJECT: and BODY: fields. Here is the code that I currently have:

Code:
Private Sub Command33_Click()
Dim strEmail As String
Dim strMsg As String
Dim oLook As Object
Dim oMail As Object
Set oLook = CreateObject("Outlook.Application")
Set oMail = oLook.CreateItem(0)

[code]...

There are two issues I keep running into:

1. This code opens outlook and populates all of the fields but pastes the email incorrectly. Instead of pasting just the email (email@email.com) it pastes the html tags as well (email@email.com#mailto:email@email.com#) which means that the user would have to delete everything between the #'s in order to send the email every time.

2. I currently have the email BODY pulling from a table but this obviously limits what I can do. I would like to simply encode the BODY within the VBA code. The setup I am looking for is:
one paragraph
a blank line
a hyperlink to a website
a blank line
another paragraph

View 9 Replies View Related

Max Value For A Single Date/multiple Time/single Tag ID Combination

Oct 18, 2007

Hi, thanks in advance for any help you can offer. I've got a table that has

Date
Time
Tag ID
Power Level

throughout the day a computer listens to several tags (transmitters) and records the power level of the signal generated by the tag each 3 seconds. What I'd like to do is build a query that gives the Date, Time and Maximum Power level reading for each tag ID. I only want 1 record per tag per day

I've tried using "group by" and max in the query but this gives me all the times throughout the day.

anyway, thanks again for looking

cheers, Shaun

View 2 Replies View Related

Compare Several Hundred Rows Against Other Rows

Nov 21, 2005

Not sure if what I want to do is possible, or at least possible the way things are set up.

I have a massive table - c. 6 million rows. It contains data along these lines:

Plan#, Item, Price, Description, Colour, Value, Location, etc.

The primary key would be Plan# + Item. Each Plan# has approximately 1,000 Items, and there is only 1 Item per Plan#. There are only a limited number of Items (c. 1500) and all or only some Items might be assigned to the Plan#. All items under each unique ID# belong together, sort of in a set. So this huge table has approx. 6,000 unique sets (based on Plan#).

To add to the confusion, Item A under Plan#1 may have different information (Price, Description, Colour, etc.) from Item A under Plan#2. I know this isn't a great way to set up data but this is what I have to work with.

Over the years it's possible that the exact same combination of Items with identical values might have been set up for multiple Plan#s. What I need to do is find any Plan#s which have the exact same combination of Item, Price, Description, etc. So if Plan#R has 200 rows and Plan#S has 201 rows, it automatically doesn't match. If Plan#R has 200 rows and so does Plan#T, all information in each record must match between the two Plan#s (with the exception obviously of Plan#).

I don't think this is possible, and if it is I am sure it's not going to be easy. So far the best I can do is to come up with finding duplicates on Item, Price, Description, etc. but that's only one record at a time and doesn't tell me if the two Plan#s match.

Any help or suggestions would be much appreciated.

Thanks!!!

View 3 Replies View Related

Concatenate And Iif

Mar 24, 2006

I have a problem I am working and and am not sure what the best approach is, hoping someone can lend me some insight:I have two fields on a table:SerialNumber....LocationI need to concatenate these two (no problem there). However my situation is such that my serial numbers vary in the number of digits. For example:serial - 55124 (five digits)serial - 552356 (six digits)serial - 5514235625 (ten digits)the serial number field is 10 characters and the serial numbers can be anywhere from one to ten in length (this is external data I am working with, not data I created)When I concatenate the two fields I need the location value to always be in the same place, so if I have a location called - TEST - I need the end result of my concatenate query to place the location always after the tenth place of the serial number position, like this:55124_____TEST552356____TEST5514235625TEST(Without the underscores)Don't ask me why...it's a long story.

View 2 Replies View Related

Concatenate

Dec 9, 2004

I have a table that I would like to concatenate three name fields:

Last Name, First Name, Middle Name. I inserted a field between each one to create a space when the fields are brought together. The table looks like this:

Last Name, Blank 1, First Name, Blank 2, Middle Name

When these five fields are brought together they can not exceed 25 characters, so the middle name will cut off when the field reaches 25.

Any help will be appreciated.

View 1 Replies View Related

Concatenate Question

Aug 27, 2006

Hoping someone can help me with this:

I have a table with two fields that I am wanting to concatenate. The two fields are: Order and Line#. The line numbers are sequential by tens, like this:
10, 20, 30...etc.

So I have order lines that are from two to four digits. Like this:
20
120
1020

All order numbers are six digits. I want to concatenate the order and line (easy to do) my problem is I want to append zeros in front of any line number less than four digits. For example, using the lines above and an order number of 111111 I want the result of the concatenation to be like this:
1111110020
1111110120
1111111020

Sorry to ask...but I don't know how to do it.

Thanks for looking!

View 3 Replies View Related

I Am Trying To 'concatenate' The Two Id Fields Together

Oct 17, 2006

I have two fields in a table.

client_id and property_id

client_id is an autonumber with a format of 0000000 (meaning the first record is 0000001)

property_id is made up from the first 4 letters of and address line (for example Smith Street would be shown as 'Smit')

I am trying to 'concatenate' the two id fields together, via an expression in a query, to get 'Smit / 0000001' but can only seem to get 'Smit / 1'

How can I solve this ?

View 4 Replies View Related

Concatenate Names

Apr 6, 2007

My database has FirstName and LastName fields.
I would like to initialize a new field called UserID with the first letter of the first name concatenated to the last name. I have found references that point to using Left([FirstName],1)&[LastName] but am unsure if this can be done in the table definition or if it must be done using a query. Either way I could use some advise on initializing this fields since I have 3500 registered users.
Thanks

View 2 Replies View Related

Concatenate And LOOKUP Help…

Aug 24, 2007

Here’s my goal.
1.)I have one column and want to add a 633 in front of if.
a.Expr3: "633 " & [Grp] & ""
b.This only shows 633 and asks for an entry for the GRP? Why? I want the format to be 633 xxx. If I do add, lets say, 123 in the popup, all of the columns are 633 123.
2.)After combining the following, I want to take that number, and look it up in another query. If the number matches a number in the other query, than I want it to enter the number in column 1. If not, I want it write no number. I have gotten this part to work using an IIF function but I just wanted to let you know what I am after.

View 6 Replies View Related

Concatenate Four Fields

Feb 25, 2008

I have this query
SELECT [9A].DO, [9A].WORK, [BATCH] & " " & [SOURCE] & " " & [NO] & " " & [SEQ] AS RECEIPT,
FROM 9A;

It returnes the results like this:
RECEIPT
6/2/2003 P 29 10
1/15/2003 P 54 55
3/3/2003 P 42 7
1/6/2003 P 39 35
12/30/2002 P 23 30

What changes are needed to the query to return it like this:
06022003P0029010
01152003P0054055
03032003P0042007
01062003P0039035
12302002P0023030

In other words
The date must have 8 charactors with no /
Then P with no spaces before or after
The next number must have 4 charactors no spaces
and the last number must have 3 charactors

Thanks

View 1 Replies View Related

Concatenate In Acess

Apr 4, 2006

Hi ...

I have a table called new items which has these fields

Name (Primary)
Serial No
Tag Type
Description
Status


I want the name to be unique and generates automatically and be SerialNo + Tag Type + Description <<<< NAME

I tried a querie which doesnt work
Code:[Description] & ", " & [SerialNo] & " " & [AssetType]

View 1 Replies View Related







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