Forms :: Inserting Data From Multi Rows Into Separate Columns

Oct 17, 2013

I have a database with a form that has 3 fields in a subform. I need to paste there data from multi rows. Now I have to do this column by column and paying attention that I select them correctly. Is there a way to directly insert the data by selecting only 1 field and have the data directly there as it would in excel?

Now we use excel as a "between" road to paste it there and then copy it from excel and paste it into access.

View Replies


ADVERTISEMENT

Combining 2 Query Columns Into 1 Column With Data In Separate Rows

Mar 29, 2012

I have a database with all the hours employees have logged stored in the database. Our payroll company wants an excel spreadsheet that has very specific info in particular columns and fields on the excel spreadsheet, so I'm trying to design a query which will put the correct info in the correct fields per their system.

The challenge is, I have currently a query with Employee ID, Overtime Hours, and Regular Hours as separate columns.

I need to translate this to a query with a single column for hours and a separate column that designates those hours as OT or Reg, with two rows for those employees who have both types.

Current:

ID / Regular Hours / OT Hours
101 / 70 / 7.5
102 / 30 / 0
103 / 5 / 0

Needed:

ID/ Hours / Type
101 / 70 / Reg
101 / 7.5 / OT
102 / 30 / Reg
103 / 5 / Reg

I don't know how to create a query or a formula in a query to break out each employee row into multiple rows with different data in the hours column. It seems like there's something pretty straightforward that I've done in a similar vein but it doesn't seem to work - I can do the opposite and combine those hours by using the SUM function in a query, but I can't seem to break it out this way.

Access 2007, Windows 7.

View 5 Replies View Related

Access Reports: Adding Lines To Separate Rows And Columns Like Excel

Nov 4, 2004

Ive been converting .xls files to Access database files. I would like to use ACCESS to develop the Reports but the client wants the Reports to look like those in EXCEL..eg. where you have lines between rows and columns. If I could give my Access Reports the same look and feel, I could wean these guys off of Excel and into the wonderful world of relational models.

Does anyone have sqlcode or tricks I might use to create the Excel 'look alike' report in Access?

thks in advance...and I will sum.

the ravenman.

View 1 Replies View Related

Queries :: Find Latest Date In A Table Where Dates Are In 2 Separate Columns And Multiple Rows

May 19, 2015

I am trying to find the latest date in a table where the dates are in 2 separate columns and multiple rows. (there are business reasons why there are 2 dates per row they represent different but comparable activities)

I have a table "Assessment tracker" with the following structure

Name Type
Candidate short text
Unit short text
EV1 Date Date
EV2 Date Date

My Data:

Candidate Unit EV1Date EV2 Date
TH1 10 07/05/2015 25/05/15
TH1 10 07/05/2015 07/06/15

I have a query "Candidate AC Dates" that compares the 2 dates EV1 and EV2 and outputs a 3rd column with the latest date.

Query:
PARAMETERS [Candidate Name] Value;
SELECT [Assessment Tracker].Candidate, [Assessment Tracker].Unit, [Assessment Tracker].[EV1 Date], [Assessment Tracker].[EV2 Date], Max(MaxDate([Assessment Tracker]![EV1 Date],[Assessment Tracker]![EV2 Date])) AS Achdate
FROM UnitData INNER JOIN [Assessment Tracker] ON UnitData.Unit = [Assessment Tracker].Unit

[Code]....

Output:

CandidateUnitEV1 DateEV2 DateAchdate
TH11007/05/2015 25/05/201525/05/2015
TH11007/05/2015 07/06/201507/06/2015

It does this by using a function shamelessly copied from the web somewhere...

Function Maxdate(ParamArray FieldArray() As Variant)
' Declare the two local variables.
Dim I As Integer
Dim currentVal As Date' Set the variable currentVal equal to the array of values.
currentVal = FieldArray(0)
' Cycle through each value from the row to find the largest.

[Code]....

This is working well (I think)

I then want to find the latest date for the 2 records i.e. the Max value for the Achdate.

Query:
SELECT [Candidate AC Dates].Candidate AS Expr1, [Candidate AC Dates].Unit AS Expr2, Max([Candidate AC Dates].Achdate) AS MaxOfAchdate
FROM [Candidate AC Dates]
GROUP BY [Candidate AC Dates].Candidate, [Candidate AC Dates].Unit
ORDER BY [Candidate AC Dates].Candidate, [Candidate AC Dates].Unit, Max([Candidate AC Dates].Achdate) DESC;

But this is returning

Candidate Unit MaxOfAchdate
TH1 1025/05/2015

I expect it to return

Candidate UnitMaxOfAchdate
TH1 10 07/06/2015

It looks to me like MAX is considering only the day value rather than the whole date. I suspect this is because it is considering the results of the function in the first query as a short text rather than a date field. (I've tried to force this through declaring the variables as dates but don't know where else to force this. (I am UK based hence the DD/MM/YYYY format)

View 14 Replies View Related

Queries :: How To Split Data Into Separate Columns

Nov 11, 2013

I have been given the task of organising a mail-merge with a sharepoint list, but the names and emails attached to each object are seperated by a delimiter. Furthermore each person is associated with many objects, and they want the merge programmed to only send 1 email to each person.

So what I need to do is split the data in one column into three separate columns, and then perform a concatenate. The concatenate isn't an issue, but how to split the data into 3 new columns within Access?

If worst comes to worst I'll tell them they will have to use the text-to-columns function in excel first, but would like to try and avoid that where possible.

View 4 Replies View Related

Take Data From Rows And Move Into Columns.

Mar 11, 2007

Hi, I have data from a form on my website in a text file, that corresponds to each visitor's input, each 13 lines in the form belongs to one visitor, as shown (twice) at the end of this message.


What I would like to do is have each visitors inputs translated to ONE row, with 13 columns/fields each. It could be appended to the same table or preferably generated in a new one. Note, there are no blank fields, some won't have data after their title, i.e. addy_line_2: is often blank, but at the very least, addy_line_2: or another field name is always there.

It would ROCK if I could also automatically take the name of each field out, i.e. each name is continuous characters up to the : (colon) ...

Thanks in advance, my Access knowledge is obviously limited, I'm sure this is fairly simple!

The fields:

Phone: 213-555-1212
Submit: Continue
addy_line_1: 1000 Melrose Place
addy_line_2:
badge:
city: Los Angeles
email:
homegroup:
name:
program:
state: CA
volunteer:
zip:
Phone:
Submit: Continue
addy_line_1:
addy_line_2:
badge:
city:
email:
homegroup:
name:
program:
state:
volunteer:
zip:

thank you thank you thank you thank you thank you !!

View 1 Replies View Related

Merging Data From Columns Into Rows

Jan 19, 2006

Hi everyone,

I can't get my head around this so I'm looking for some help if possible please, there are two questions, the first is:

When in the query, I want the criteria for the date selection to be a question, ie. "[Week Start Date?]" but I want the actual criteria selection to be from the start date plus 5 days, the only way I've done that so far is to do ">=[From?] and <=[To?]", which uses two questions and I don't seem to be able to do ">=[Week Start Date?] and <=[Week Start Date?]+5" which seems basically correct, but I expect I'm writing it incorrectly (basic access knowledge I'm afraid :( )

The second question (after I've got the 5 day date criteria sorted) is that the query produces a table that shows basically the following:

Name Store Date Visited
Tom Bury 18/01/06
Tom Bury 19/01/06
Tom Diss 20/01/06
Dick Thetford 18/01/06
Harry Diss 20/01/06

The query is based on a part week period with the starting date ALWAYS a Monday, so no more than Mon-Sat will appear, I want to put the information into a table or query, so the result ends up as:

Name Store Mon Tue Wed Thu Fri Sat
Tom Bury 18/01/06 19/01/06 'Blank' 'Blank' 'Blank' 'Blank'
Tom Diss 'Blank' 'Blank' 20/01/06 'Blank' 'Blank' 'Blank'
Dick Thetford 18/01/06 'Blank' 'Blank' 'Blank' 'Blank' 'Blank'
Harry Diss 'Blank' 'Blank' 20/01/06 'Blank' 'Blank' 'Blank'

*Where the blanks are simply left empty, rather than putting in the word 'blank'

Essentially converting the "[From?]" (as stated earlier) or "[Week Start Date?]" to Monday, that date + 1 to Tuesday, etc, BUT putting multiple dates relating to name and store criteria onto one record :eek:

Beyond me I'm afraid, any pointers would be seriously appreciated, I expect I'm approaching the problem from the wrong angle.

Regards
Tony

View 1 Replies View Related

Merging Data Columns Into Rows

Jan 19, 2006

Hi everyone,

I can't get my head around this so I'm looking for some help if possible please, there are two questions, the first is:

When in the query, I want the criteria for the date selection to be a question, ie. "[Week Start Date?]" but I want the actual criteria selection to be from the start date plus 5 days, the only way I've done that so far is to do ">=[From?] and <=[To?]", which uses two questions and I don't seem to be able to do ">=[Week Start Date?] and <=[Week Start Date?]+5" which seems basically correct, but I expect I'm writing it incorrectly (basic access knowledge I'm afraid :( )

The second question (after I've got the 5 day date criteria sorted) is that the query produces a table that shows basically the following:

Name Store Date Visited
Tom Bury 18/01/06
Tom Bury 19/01/06
Tom Diss 20/01/06
Dick Thetford 18/01/06
Harry Diss 20/01/06

The query is based on a part week period with the starting date ALWAYS a Monday, so no more than Mon-Sat will appear, I want to put the information into a table or query, so the result ends up as:

Name Store Mon Tue Wed Thu Fri Sat
Tom Bury 18/01/06 19/01/06 'Blank' 'Blank' 'Blank' 'Blank'
Tom Diss 'Blank' 'Blank' 20/01/06 'Blank' 'Blank' 'Blank'
Dick Thetford 18/01/06 'Blank' 'Blank' 'Blank' 'Blank' 'Blank'
Harry Diss 'Blank' 'Blank' 20/01/06 'Blank' 'Blank' 'Blank'

*Where the blanks are simply left empty, rather than putting in the word 'blank'

Essentially converting the "[From?]" (as stated earlier) or "[Week Start Date?]" to Monday, that date + 1 to Tuesday, etc, BUT putting multiple dates relating to name and store criteria onto one record :eek:

Beyond me I'm afraid, any pointers would be seriously appreciated, I expect I'm approaching the problem from the wrong angle.

Regards
Tony

View 2 Replies View Related

Changing Data From Columns To Rows

Jun 30, 2006

Hi all,

I have a query which runs off a table. I have the following Fields as columns in query: WeekID, A, B, C, D, E

For each week, the letters correlate points given. So for week 1, "A" could have 1 point, "B" could have 3 points, etc.

I want to run a Query that will show A, B, C, D, E as rows like the following:

Letter_Week 1_____Week 2_____Week 3
A_______1_________5___________3___
B_______3_________4___________2___
C_______2_________1___________7___
D_______6_________3___________3___
D_______3_________1___________4___

I can't run a crosstab because it will only crosstab values within all of A, B, etc.

Any idea guys? Thanks in advance, as always.

Caliboi

View 3 Replies View Related

Modules & VBA :: Change Data In Rows To Columns

Apr 7, 2015

I am trying to change the data in my rows to columns...I have data as per the attached picture in columns B-I...I would like the rows to be pasted to columns as per columns M-Q...so row 1 ends up as the first lost of data in M-Q and row 2 ends up as the second lot of data.There are numerous rows in my actual file.

View 6 Replies View Related

Modules & VBA :: How To Manipulate Data Export In Rows To Become In Columns

Oct 14, 2013

The key field is the specimen number and specimen type. Currently for every antibiotic there is a row with its result. My output is 3 complete worksheets so a lot of data. I need to create a database with one row per specimen number/type to include whether it is S/R/or I for each type of antibiotic. The example probably makes more sense. but I'm assuming that 65000 rows * 3 sheet can then be reduced to around 18,000 rows.

View 4 Replies View Related

Getting Data From Rows To Columns Based On Common Fields

Jul 30, 2013

I have a big Excel file with payroll information about employees. Per employee per date, there are a couple of rows with mostly identical data (such as the employee's home address) but 2 differences: one will have paycode A with amount B, another will have paycode C with amount D, etc. I want to simplify the file to have 1 row per employee per date: in the example given that row would have paycode A with amount B as well as paycode C with amount D, in 4 separate columns.

I think I can technically solve this by creating Excel files per pay code/amount, and then linking them together by person and date, 1 by 1, through Access. This is feasible because there aren't that many different pay codes. But still, I was wondering if there was anyway to solve my problem in Access itself.

View 1 Replies View Related

General :: Cross Tab Query To Display Data By Rows And Columns

Jul 10, 2013

I have a cross tab query that displays data by customer (rows) and MONTHS (columns).

However I need the columns to be the 12 months of the year 1 to 12.

However, if the selected data for a particular customer does not have any records in a month then I get an error in the report as the cross tab query only selects the months with data.

How do I get the report to show 0 or a blank in these columns

View 2 Replies View Related

Forms :: Display Records As Columns Instead Of Rows

Sep 12, 2013

I think the answer to this question is going to be a flat 'No', but here we go.

I want to have something like a datasheet, except with with records shown as columns instead or rows.

For clarity, a datasheet displays records as rows, like this:

field 1 field 2
record 1 record 1
record 2 record 2

I'm wanting to present the data the other way around, like this:

field 1 record 1 record 2
field 2 record 1 record 2

Just to complicate matters, the number of records to be displayed is variable, so it should add more columns as required.

About the only option I can think of is to create a subform with fields stacked in a column without labels, and try to dynamically stack the forms as needed, hooking them up to the correct data on the fly.

Alternately, I wondered if I could dynamically generate a recordset with each record containing the field value of multiple records. I can see myself getting into trouble trying to update data this way however.

View 1 Replies View Related

Forms :: Hiding Columns On Subform Based On Multi-Value Lookup Field

Aug 7, 2013

I want to use VBA to hide columns in a subform based on what is checked in a multi value look up field.

I am creating this DB for use with sharepoint as a web database, which is why I am using the lookup field to begin with. There will be a client DB to use with some VBA code

So what I have is a lookup field with tests "Test 1, Test 2, etc" on form sample.

There is a subform called results, and I want to hide certain columns based on what tests are performed.

I tried using an If Then statement (code is being run on subform load)

If Me.Parent.fieldTest = "Test 1" Then
Me.Test1Col.ColumnHidden = False
Else Me.Test1Col.ColumnHidden = True

That is basically the code I was trying to use. I am getting an error 13, which I assume is because fieldTest can not = something since it is a multi value look up field.

View 3 Replies View Related

Modules & VBA :: Union All Query - Transposing Columns To Rows With Variable Columns?

Aug 8, 2013

I was able to use the UNION ALL qry. But, when I have another file (like original2) that does NOT have all the columns listed in the UNION ALL qry, I get a Parameter value box asking for the missing columns when I run the qry.

Example:

original1IDDateGroupChristianJohnnySteve 18/5/2013A1528/5/2013B338/5/2013C2348/5/2013D2358/5/2013E5

original 2IDDateGroupChristianJohnny18/6/2013A212528/6/2013B2338/6/2013C2248/6/2013D22

The UNION ALL qry includes all the possible resources ( includes all the possible column fields Christan, Johnny, and Steve).

When I run the UNION ALL qry with the original2 file, An "Enter Parameter Value" box is displayed with the mssing column name "Steve".

Is there a way to Map the original2 table into a working table with all the columns, or use VBA code to construct the UNION ALL qry to only include the existing columns? My data has variable columns and I'm trying to avoid the parameter popups.

View 2 Replies View Related

Converting Rows To Columns And Columns To Rows

Jul 31, 2013

I am trying to convert a table that looks like the following...

Customer Name SumofSum of Bill Rate Reviewer
000462 John 500 Mike
000224 Mike 900 Jeff

I would like to covert it to....

Customer 000462 000224

Name John Bill
SumOfSum.. 500 900
Reviewer Mike Jeff

I don't think Access has any functions for this but I am not 100% sure. I know this can be done in a Module but I am not sure of how to code it.

View 12 Replies View Related

Inserting A New Row Between Existing Rows

May 15, 2007

To Whom It May Concern

I would like to know how can I insert a new row between an existing row in an Access Table

For example,

I want to insert a new row between line number 122 and 123. Do I need to get rid of the primary key or change it to Number. What I am doing now in order to have several topics group together on a report such as "Activities Topic" and a Date field for that topic. However, there are various topics under the Activities topic. Each new information that is being updated for this topic I have to reorder the number by the topic name in the Order field so that the date will be in chronoligal order in the report.

Is there a better way in do this?:confused:

View 1 Replies View Related

Inserting Columns

Dec 30, 2004

i am working on my company's database which is in access 97, and has a backend. the normal entry way when you add a column it wont save as it says it can't save propertys to a linked table. i added the required fields to the backend without any problems and saved and exited. now when i go into the "frontend" the fields arn't showing up on the table. any ideas?
thanks
briar

View 6 Replies View Related

Forms :: Inserting Data In Table

Nov 9, 2013

I am new to Access and i am designing a payroll system for my company. I have created a Table with

EMP Id, Name, Basic Pay, Total Working Days, Actual Work Days, Earned Salary, OT days, OT Hrs, OT Pay..

Now i have created a form with all the above fields.and calculated the earned salary from the control source where Earned Salary= Basic pay / Total Working Days*Actual Work Days and OT Pay =[Basic Pay/Total Work Days/8]*150%*OT Hrs.

Now my problem is i am not able to populate the fields in the table.

View 4 Replies View Related

General :: Splitting Quantity Into Separate Rows

Mar 5, 2013

I have a query that holds info for a WORK ORDER FORM. E.G The work order requests 3 staff member.

Is there a way to have a separate table or query split this quantity into three rows so i can assign an employee to each request?

I sometimes get requests for 20-30 staff and dont really want to add lines manually.

View 1 Replies View Related

Totalling Columns & Rows Into Columns

Mar 22, 2007

I'm affraid my confusing topic title is an indicator of how confused I am by this. I can't even understand the variables well enough to fully utilize Access Help or the Search function here...

What I have is a database hat has column headers that look something like this:
Customer_Name, Order_Date, Qty_Ord, Unit_Price, Total_Price

What I'm trying to get is a query output that will have

Customer_Name, Total Orders (in Dollars) for January, Total Orders (in Dollars) for February, Total Orders (in Dollars) for March, etc.

I've been able to set it up to SUM for one month, but not multiples.

I know I'm totally lame (for proof read any of my previous posts) but you guys totally bailed me out the other time I asked a lame question.

Thanks in advance!

View 3 Replies View Related

Separate Protections For Columns In Excel

Jan 11, 2005

Hey, does anyone know how to set up a formula that will allow me to turn either one column on, or another, but not both at the same time for data entry eg. one column for dollar figures and another for sterling currencies?

Much appreciated!

View 2 Replies View Related

Parsing String Into Separate Columns Of A Table

Sep 3, 2007

:confused:

I have a Microsoft Access table with the following columns: A,B,C,D,E,F.
In first row of Column A, I have the following string value: "Al,Peggy,Kelly,Bud,Buck"
What I would like to do is parse this string as such:

Column B:"Al"
Column C:"Peggy"
Column D:"Kelly"
Column E:"Bud"
Column F:"Buck"

Is there a simple VB funtion to accomplish this?

View 1 Replies View Related

Queries :: Delimited Text To 10 Separate Columns?

Sep 8, 2014

I'm trying to build a query that can parse Delimited text to columns, for example I have the following:

ID,Name,Tel,Fax,Email,Directorate,DOB,AOCD,Reg,CD

I would like to convert the above in 10 seperate columnns within a query?

Is this possible? I know you can import delimited text to columns but that is not what i'm after for other reasons.

View 14 Replies View Related

General :: Query To Separate Columns In Table

Aug 14, 2014

I have a table tblItemSold

ItemNum Date Sold
1111 Aug-10-2014 25
1111 Aug-9-2014 24
1111 Aug-8-2014 23
2222 Aug-10-2014 11
2222 Aug-9-2014 12
2222 Aug-8-2014 13
3333 Aug-10-2014 5
3333 Aug-8-2014 3

I want to write a query and transform above into

ItemNum Aug-10-2014 Aug-9-2014 Aug-8-2014
1111 25 24 23
2222 11 12 13
3333 5 3

View 3 Replies View Related







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