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 Replies
ADVERTISEMENT
Feb 26, 2006
Im integrating a Scanpal Batch barcode scanner into my application, and need a little help with my label printing facility.
at the moment the scanner imports a list of barcodes and quantitys this is merged with my product table and results in a table something like this:
barcode | Description | price | quantity
123456 | my stuff | 9.99 | 7
i need a query to move this to my label printing however my print queue works like this
barcode | Description | price
123456 | my stuff | 9.99
123456 | my stuff | 9.99
123456 | my stuff | 9.99
123456 | my stuff | 9.99
123456 | my stuff | 9.99
123456 | my stuff | 9.99
123456 | my stuff | 9.99
can a query do this?
Thanks
View 4 Replies
View Related
Jan 25, 2005
I have a table field which long ago was merged from several other fields. When the data was merged into the field it was delimited by "1." then "2." up to "5."
Example: MergedField = "1.Animal 2.Large 3.African 4.Grey 5.Long Nose"
I now want to split it appart in a query where "1.Animal" goes into expression1, "2.Large" goes into expression2, etc.
I need to base the text on where the one number begins and grab everything until the next number in the mergefield is detected.
Can someone show me the syntax for this.
Thanks!
View 1 Replies
View Related
Feb 1, 2006
Hi all,
I have a problem this is part of my database
ID NAME DATARANGE ck1 ck2
1 dave 23-Jan-06,24-Jan-06,30-May-06 dataprojector s/table
2 John 23-Feb-06,24-Mar-06,30-Apr-06 s/table
What i would like to do is to run an maketable / updatetable query that splits out the daterange dates into seperate rows and also if there is a value in ck1 or ck2 replace the current value with either a 1 or 0.
So the above table would look like this.
ID NAME DATARANGE ck1 ck2
1 dave 23-Jan-06 1 1
2 dave 24-Jan-06 1 1
.
.
.
?? John 23-Feb-06 0 1
John 24-Mar-06 0 1
ETC
is this possible any help would be greatful
Thanks
Dave
View 3 Replies
View Related
Apr 5, 2012
I am working on a project that requires to calculate interest on the amount. There are 2 tables, 1 with Interest rate for a product for different and periods and another is product table with amounts in different period.
Table 1 (Rates table)
Product From To Rate
1111 1/1/2012 1/20/2012 .75
1111 1/20/2012 1/28/2012 .50
1111 1/28/2012 4/6/2012 .40
Table 2 (Product table)
Product From To Amount
1111 1/1/2012 1/17/2012 10000
1111 1/17/2012 1/24/2012 15000
1111 1/24/2012 2/25/2012 20000
What i need to do is to calculate interset based on the above 2 table and insert into another table (Interest). However, the problem is with identifying correct rates for the periods in Table 2.
Eg.
for period 1/1 to 1/17: applicable rate would be .75
for period 1/17 to 1/24: From 1/17 to 1/20 the rate would be .75 and from 1/20 to 1/24 it would be .50
this is what i want to achieve, basically to split the period between 1/17 to 1/24 into 2 so that appropriate rate can be applied.
View 1 Replies
View Related
Jun 21, 2013
I have a form for inserting invoices, and on the subform records I have a command button to print the labels, the label would contain the quantity of the product, so, if the quantity is ex. 11000 and package contains 2000 only.
so I have to print 5 labels with quantity 2000 and one label with 1000 qty
what I need to do, is when I click the label cmd button to insert the 6 records required to print the labels to temp table
View 8 Replies
View Related
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 9 Replies
View Related
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
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
Apr 22, 2014
I have a table called ( purchasing ) I also have a form called ( stock )
I purchase parts from stock and those quanities goes into the table ( purchasing )
Is it possible to create a text box in the form ( stock) that looks at all the table purchasing and sums up the qtyreqd for the part in stock ...
I have tried = sum([purchasing]![qtyreqd]) but just get an error ....
View 4 Replies
View Related
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
Mar 19, 2014
I've now populated my database with all my sales information.
Now, towards plan/prepare 'replenishments' from suppliers, I need to know how many of each product I've sold (ideally between two given dates ....because recent sales history is more important than say sales information from 1 year ago), but let's keep it simple!
How can I get such info out of my database, the info is contained in my database something like this...
Code:
Order date Qty Product ID
1-feb-2014 1 widget A
2-feb-2014 1 widget A
2-feb-2014 1 widget B
3-feb-2014 2 widget A
4-feb-2014 5 widget C
(in my database, qty is declared as 'double', where Product ID is categorized as 'text')
So I'd like an 'order summary' from the above raw data (contained in my database) to look something like this...
Code:
Widget A Sales = 4 units
Widget B Sales = 1 units
widget C Sales = 5 units
How can I do that please? (I looked at access reports, but couldn't see a way of multiplying 'product by quantity' & then total it all up).
View 12 Replies
View Related
May 15, 2015
I have a 'tblStock' with fields 'ProductID', 'InitialStock', 'Buy', 'Sell' and 'UpdatedStock'. I also have a form 'StockUpdate' add values and also add new records to 'tblStock' .
If I have value [100] for IntialStock quantity, Buy [0] and sell [10], UpdatedStock will be [90] (that's done and fine!).
The problem is, I would like to make the UpdatedStock value [90] to be the NEW InitialStock, so that any BUY or SELL will keep updating the UpdatedStock and making it the NEW InitialStock for the next transactions and so on....
View 8 Replies
View Related
Sep 2, 2012
I have a database (already splitted in FE/BE) which Clients use on site.Part of the service we offer is Outsourcing: We do all the capturing and when they login on their side, it downloads the latest BE file for them to use "Read-Only".
However we added a new module in which half of the data on a particular table needs to be completed by the Client.So we need for the table to be splitted in such a way that they can capture their info on the form and when we log in on our side, it has to download the data they entered in the same way as when they login and download the data we captured.
Was thinking about adding a 3rd database file to the mix with just one table and in some way link that table to the existing table for the new module. But the intermediate link I created is not updateble.
View 6 Replies
View Related
Dec 19, 2013
I split a database (without first making a copy of it) on my local machine and put the front end on a shared network drive. now no one can open any of the forms since the back end is on my machine.
is there a way to undo this or to split the database on the network drive so that users can get in?
i want to avoid having to redo the database from the ground up.
View 5 Replies
View Related
Feb 15, 2013
I have created a db for a nonprofit counseling org. I had created the first half, mostly administrative tasks, called Phase1, and put the BE on a network drive and the FE on multiple users. Now in developing the clinical portion, Phase2, I linked to four of the tables in Phase1 BE file.
Now I tried to split Phase2 the same way as Phase1 and got an error "Subscript out of Range". I think because of already having some external links in it. I checked for the file and Access actually created the BE file for the new phase2, all of the tables are in it minus the four I was linking to. But, access didn't create a FE file. The original still has all of the objects, tables and forms etc. My question is; can I link to the tables in the new BE file even though those tables still exist in the original file?
View 4 Replies
View Related
Nov 28, 2012
I would like to separate my list box in two categories.Indeed it is composed by 2 types of criteria but arranged in the same List box (I can't create another List box, it's forbidden).how can I proceed?I've thought to insert a dash but it has to appear all the time and I don't know if it's possible to do that.
I've also thought to enter a title IN the list box above each category but it has to appear all the time too..when I click on one item in the List box it becomes highlight.May be code the 2 titles I could add for being always selected (highlight).I don't want to have to select the 2 titles every time!!!
View 2 Replies
View Related
Apr 9, 2013
I'm creating this database for a claims management company. Yesterday I learnt about making a many to one relationship between the claims and clients tables.
Turns out its more complicated than that. Since I'm dealing with claims, a person may add their partner as the second claimant. (usually the case in mortgages)
So where parties A and B are in a relationship:
person A may claim on their own
Person B may claim on their own
Person A may be the primary claimant and add person B
or conversely person B may be the primary claimant, adding person A.
The end goal is to automatically fill in a financial form (making use of a mail merge). So from what I know I think this means:
that grouping them as one contact is not going to work as I need them to be able to do a solo claim, and also I will not be able to easily change around who is the primary or secondary claimant, which will then carry over onto the mail merge.
So I think this means I need them as two separate contacts. However, I don't know how to create a link between them to easily add their partner to a claim.
Would this also mean I need a many to many relationship between clients and cases.
View 4 Replies
View Related
Jan 27, 2015
I'm building an application in MS Access 2010.
This application must be able to read from a big table in a separate accdb.
This separate accdb contains info that should NOT be available for all my users to copy, as it is valuable competitive information that could be abused by people with bad intentions. So, a linked table solution is not an option.
However, it should be possible to run parameterized queries that do simple look-ups that return only small/relevant portions of the database.
View 6 Replies
View Related
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
Aug 19, 2014
The problem is I need it to be only editable by 1 user, but allowing multiple other users to access it and view the records- just not able to add/edit/delete them.
The other question I had about the Split database would be- Does having a split database mean the data needs to be updated in 2 tables or am I taking Splitting databases too literally?
View 14 Replies
View Related
Jul 27, 2013
I have an A2007 database used for time and billing. As time goes on I've had to add more forms and especially more reports. I feel the because of all these "additions" the FE is getting a bit bloated, something like 2.2MB right now.What I want to inquire about is the possibility of moving at least some (if not all) of the forms and reports to another FE and can this be done without having to move tables and/or queries?
The navigation pane is "hidden" from the users so they don't see all the tables, queries, forms and reports but some are smart enough to figure out to "unhide" the navigation pane.Concerning the forms; there are certainly some forms that I do not want other users to open out of curiosity, or for whatever other reasons they might have, so these I would want to move. The same basic reasoning would apply to the reports.
My thinking would be this; move a particular form/report to a separate FE that merely acts as a "bucket" to store the form/report. Clicking on the control in the main FE would open the form/report stored in the other FE using the tables and queries in the main FE.can it be done without having to re-write a bunch of code? I know I can add code so certain controls aren't visible to certain users but I've not found a way to permanently lock and hide the navigation pane.
View 4 Replies
View Related
Sep 24, 2014
I have the need to put a separate image per ID on my table/form or a separate link to an image I can put an image on my form but its does not change when I change my clients its the sam e all the time, I have tried linking to an excel book but for some reason it will only show 10 fields, (and it is linked).
I don't mind creating a standard windows folder with my images in but would need to be able to link to each one from my form.
View 8 Replies
View Related
May 24, 2013
I am trying to import several hundred records into Access from a txt file but I can't find a way to separate the file into individual records. A portion of the file is given below:
'C Olive Teece', 'Census, 1940', 'birth: 1919 New York', 'residence: 1940 Ward 4, Canandaigua, Canandaigua City, Ontario, New York', 'spouse: John H Teece', 'parents:', 'children:'
'Edith Teece', 'Census, 1940', 'birth: 1888 England', 'residence: 1940 Smithtown Town, Suffolk, New York', 'spouse:', 'parents:', 'children:'
'St Clair Teece', 'Census, 1940', 'birth: 1867 Pennsylvania', 'residence: 1940 Ward 3, New Castle, New Castle City, Lawrence, Pennsylvania', 'spouse:', 'parents:', 'child: Edward C Teece'
View 14 Replies
View Related
Jan 29, 2015
Whenever I create a combobox, Access asks me if I want to grab the values from another table, or if I just want to manually input the possible values.
My question is: is one of the two solutions "better" than the other?
Let's imagine I am creating a Form where I can create a new Contact, and in a listbox (with multiple selections allowed) I want to list the possible character traits, so I have
- Funny
- Annoying
- Smart
- Interesting
- Good-looking
- ...
I think that if I need to store in the Contact records these possible traits, I will have to create a Many-to-Many relationship (therefor creating a junction table) between Contact and Traits.
On the other hand, could I do everything without grabbing values from an extra table and directly inputting the values in the listbox? How would these elements be stored in the Contact record if I allow multiple values in one single field?
View 9 Replies
View Related
Jul 30, 2014
I need a simple audit capability
I have a table (Called Master Active List)
I have an empty duplicate of it called History of Master Active List. (Identical fields, with the addition of a distinct ID (primary key)
I have a form where the master can be changed (Called customer details)
When any change is made I want to post the whole record to the history table
1 - Am I correct I no longer need a form based one,(office 2013) and can do one on the data table itself?
I want to capture everything, can this be done with a wildcard, or do I need to go line by line?
The master table has a ton of fields.
View 3 Replies
View Related