473,397 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

How to Duplicate Table Entries by a Quantity?

4
This question is completely backwards, to what a database is suppose to do, however because of the interaction between two systems it needs to be this way. I am looking for some way to have a report display the information bellow.

I am simplifying the problem to what I am trying to accomplish. I need to have quantities be able to repeat an entry as many times as there are quantities.

OrderNumber, QTY, PartNumber
PO0001, 2, PN-01
PO0001, 1, PN-02
PO0001, 3, PN-06

Result needed or Output needed.
Unit A PO0001, PN-01
Unit B PO0001, PN-01
Unit C PO0001, PN-02
Unit D PO0001, PN-06
Unit E PO0001, PN-06
Unit F PO0001, PN-06

Does anyone have any ideas on how to accomplish this?
Thanks for the help.
Jul 1 '10 #1

✓ answered by FishVal


4 1841
NeoPa
32,556 Expert Mod 16PB
I would suggest this needs some VBA coding including a loop.

Open two recordsets and process through the first inputting the data. Next, or should I say after each individual record has been read from the first recordset, write out the data to the other recordset n times.

Access VBA DAO Recordset Loop Using Two Recordsets may help as a basic template for your code. Let us know how you get on with this.

Welcome to Bytes!
Jul 1 '10 #2
NeoPa
32,556 Expert Mod 16PB
Trumped!

That's a better solution I would say.
Jul 2 '10 #4
Talnus
4
Ahhh that worked GREAT!!! Thanks!!!
Jul 7 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Silvio | last post by:
Here's my update statement: UPDATE Item1 SET reviewloop = 1, currentreviewstate=5 WHERE itemid in (SELECT itemid FROM Item2) The thing is: the table Item2 DOES NOT HAVE a field called...
0
by: james | last post by:
Hi guys! I´ve got a centerd table on my site with a black 1 pixel border. What i would like to do is to add a drop shadow to the table. Anyone know if it's possible to create a drop shadow for a...
1
by: Mike | last post by:
Hello, I have a string that will contain a table like this: <tr><td>column1data</td><td>column2data</td></tr> I want to use javascript to extract the data for a given row and column. I'm...
0
by: Fred Lock | last post by:
Does anyone know how to make the following centered floated "unknown width" menu into a fully-fledged single-level drop menu? (as copied from http://www.cssplay.co.uk/menus/centered.html): ...
1
by: pointBoarder | last post by:
I'd like to be able to create a table listing all the files in a certain directory... Anyone know how to go about this or where I could look for more information? Thanks for the hand :] Derek
12
by: Sam Halliday | last post by:
i am currently in the process of writing a program to convert a type 1 psf font file into a file compatible with the linux kernel's format for compiled-in fonts (see...
11
by: Sheau Wei | last post by:
i wish to know how to create a dinamically edit table entries .can u help me ?thanks.
3
by: Marc | last post by:
Anyone know how to add a drop down menu to a button that will appear when you right click the mouse?
5
by: Shiao | last post by:
Hi, I am getting duplicate log entries with the logging module. The following behaves as expected, leading to one log entry for each logged event: logging.basicConfig(level=logging.DEBUG,...
0
by: dreaken667 | last post by:
I currently have a PHP script that pulls records from a table and runs PHP scripts based on the table entries, but it requires that I actually load the page in a browser and wait for it to complete....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.