Add multiple new records based on quantity duplicating data

I am creating a simple form to allow a new user to list a part number and 
requested quantity.
Upon executing a submit button, I would need the part number value 
added/duplicated into an existing table as many times as the requested 
quantity.
However, the requested quantity can not exceed 999.
0
Utf
4/15/2007 6:22:00 AM
access 16762 articles. 3 followers. Follow

1 Replies
2224 Views

Similar Articles

[PageSpeed] 17

Simplest solution if you are familiar with code would be to OpenRecordset, 
and AddNew in a loop.

An alternative would be to create a table containing 999 records, and use it 
as the source table for an Append query statement, with criteria limiting it 
to the desired number. This link explains how to create the table and add 
the records:
    http://allenbrowne.com/ser-39.html

(BTW, the same code also illustrates how to do an AddNew in a loop.)

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Access_toddler" <Access_toddler@discussions.microsoft.com> wrote in message
news:1A759B5C-C2F3-459C-8406-C179F075DE23@microsoft.com...
>I am creating a simple form to allow a new user to list a part number and
> requested quantity.
> Upon executing a submit button, I would need the part number value
> added/duplicated into an existing table as many times as the requested
> quantity.
> However, the requested quantity can not exceed 999. 

0
Allen
4/15/2007 11:18:53 AM
Reply:

Similar Artilces:

Multiple Routing Groups
Up to this point we have used a single routing group for our enterprise. It now appears to make more sense to create multiple routing groups, so outbound can route through local gateways, and not traverse the country needlessly. While I am researching this, are there any gotcha's or other experiences or things to be aware of when switching to multiple routing groups? tia "Tom Felts" <tfelts@mckennalong.com> wrote: >Up to this point we have used a single routing group for our enterprise. It >now appears to make more sense to create multiple routing gro...

Export to Text Files Based on Field Value
I have an Access table with personal information (e.g., first name, last name, birth date, etc.) for thousands of people. The table is sorted by state. I want to be able to run a macro on that table that will create separate pipe delimited text files for each state with all fields included. Any help would be appreciated? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/201005/1 Instead of exporting the table, export a query based on the table. You will have to have some code that loops through the states and modifies the quer...

merging 3 spreadsheets into one based upon a single common data field
OK I hope you guys can help me out. Here is the scenario. I have 3 spreadsheets. The main spreadsheet I working with has 500 lines with a unique number string. The next two spreadsheets have about 12000 lines but also contain the same unique string as the first spreadsheet. I want to search the 2nd and 3rd spreadsheet using the first spreadsheets unique id number and then take the information from the 2nd and 3rd spreadsheet and then merge it into the first. Does that make since? Any help would be great. -- xchosen --------------------------------------------------------------------...

merging into Word with filtered data
Hello, I'm trying to do a merge in Word using data from Excel. However, I don't want to merge using data from the whole worksheet, but just filtered data (all people from London - place is one of the fields in the worksheet. I have no idea how I might do this. Any help gratefully received. I believe you can accomplish this from Word by using "Query Options" and selecting to merge only those records you're seeking. HTH PC "Italian Pete" <ItalianPete@discussions.microsoft.com> wrote in message news:3E62FCDC-42EC-48DB-92AC-857B224F085F@microsoft.c...

Count Based on Comparison with Two Fields
I recently learned that I can count the number of items in one column that match items in another column by using: =COUNT(MATCH( 'Sheet1'!G2:G15001, 'Sheet2'!A2:A15, 0)) However, I now need to count records on one sheet in which TWO fields match items in both of two separate columns (i.e., a comparison of two columns to two columns and a count of records in the first that have fields matching elements in the second) . My attempt to use the above statement with an AND failed. Can someone explain how to do this? Hi I would suggest that you post a before a...

Any way to clear out stock pricing data before or after going to Quicken?
With all the discussion a few months ago about taking control of our own data, I had gone through the steps to look at my Money file as an Access DB, and found that of my 80MB, more than half was daily stock prices. Thats not something I really want to convert and maintain. I can't imagine that its really needed, since transactions have their own price info. Is there any way to get rid of it in Money, in Quicken, or other? Thanks In Money Plus: Portfolio > Other Tasks > More > Clear historical quotes The process may be different in earlier versions. "JDelMar&q...

Data Loss in Publisher
Hi I run a W2k network in a school. I have Office Group Policies in place forcing the default save location for Publisher documents (Office XP version) to the pupil's home folders. All my PCs are identical (ghost images). Pupils have roaming profiles (some mandatory). Some users save work in Publisher and the next time they log on to the network and open the saved file, it's contents have gone! There is nothing exceptional about the affected users' user accounts and they have a mixture of mandatory and roaming profiles. Has anyone come across this problem before? Than...

My Exchange server will not make new mailboxes
I had one e-mail server on this domain it was giving us trouble so I installed a new server on the domain and made it an exchange server. I moved all the mailboxes that where in use to the new e-mail server. I wait two weeks and shut down the old server, but now when I create a new user in active directory and tell it to create a mailbox it looks as if it creates one. When I look in the properties of the user and go to the e-mail address tab it is blank. When I right click on the users name and go to exchange task it gives me the option to move the mailbox to the old server which is ...

moving large amounts of data from one db to another
I have a table that has millions of rows of data in it, which then references another table with millions of referenced (matching by foreign key constraints)... I need to move this data from database A to a new database B, is there any way to do this and preserve the identity columns and their referential integrity?) Thanks! You can't have integrated RI across databases so that part is out. But you can certainly insert and keep the identities. Take a look at SET IDENTITY INSERT in BOL. -- Andrew J. Kelly SQL MVP Solid Quality Mentors "Smokey Grindel"...

New type of activity
Hello, I want to create a new type of activity. For eg., like the way we have types in Phone Task, Fax, Phone Call,etc. we need to have 1 or 2 more types. Is it possible? Regards, Venkat Venkat; New activities are not currently possible without using the SDK. MSFT has promised more flexibility with activities in v2.0 (due Q1 2005). Dave The only way to do this would be to create the new activities in a different table and link somehow back to CRM. A number of companies have developed solutions like this. As said this feature has been mentioned as a possible for the next crm release a...

Changing text based on criteria in an access report
Hello, I've got a textbox in a report, some records of which may contain text within { }. I need to find some way to format only that text (which may be in the middle of a string) so that it appears underlined and so that the brackets disappear. To illustrate, I posted a 5KB graphic here: http://img219.imageshack.us/img219/3523/jexamplemb2.png Does anybody have any suggestions or ideas? Thanks in advance! Mitch Access 2007 can format the text for you, using standard HTML for the underlining. Use the Replace() function to swap the braces for the HTML tags. Earlier versions of Ac...

Creating New GP Company
I am in the process of creating a new GP Data Company – normally I just go to utilities and select “Create A Company” and I am good to go. This time however when I create the new company not all of the Manufacturing tables/stored procedures are created. I know that I have successfully created new companies prior to me installing SP5. When I log into the new company I get the following error: SQLServer souldnot find the stored procedure ‘CDA01.dbo.msysCompDoseMfgCompExist’ then invalid object name ‘ICJC6000’ When I actually try to go into a MOP module I get a message stating that M...

Can't save new contacts in Outlook 2007
When I try to save new contacts in Outlook 2007, I get an error message: "Could not complete the operation. One or more parameter values are not valid." It's been suggested that I clear the forms cache but cannot find how to do that in 2007 (recommended link was for 2003 version). Can anyone help with that or is there another possible solution? P.S. I am working off line in Outlook, if that matters. Also, I can revise and save revisions to existing contacts with no problem. HJ Why are you starting a new thread? Suggest following the recommendations in ...

Pulling data from multiple worksheets
I have one worksheet with a listing of client numbers and names. I would like to be able to type in a client number on another worksheet and have the client name automatically populate. Look at the Vlookup function or the combination of Index / Match. Vlookup will be a little more straight forward for a first timer but Index / Match is generally speaking a more flexible and less error prone solution. -- HTH... Jim Thomlinson "parthur" wrote: > I have one worksheet with a listing of client numbers and names. I would > like to be able to type in a clie...

duplicate messages #3
Each time I click "send/receive", the same two email messages are sent to my inbox. If i clik three times, the two messages will drop into my inbox for a total of six messages! Understand, i do not have "save messages on the server" selected. I have uninstalled and reinstalled outlook twice with to no avail? Suggestions? Happens to me too. My ISP said it is poorly written spam that fails to complete sending properly, so Outlook times out without completing the task of downloading including recognising what has already been downloaded and what has not. Why can&#...

record sheet row order, then restore to that point
There is the ability to undo a sort so I suspect the information I want is somewhere. Is there a way to take a "snap shot" of a sheet's current row order, and then restore that row order at any point in the future? During sheet processing, rows will not be added, but data in any cell may change. The only other way I can think of doing this, is to record the order of some "signature" column and then use it to re-write the processed sheet to a scratch sheet. Thank you Add a new column before you do the 1st sort with number 1 to last row. then sor tby ...

summarise data
I have data on a sheet looking like this 5/5/2004 5/5/2004 7/5/2004 7/5/2004 7/5/2004 7/5/2004 8/5/2004 9/5/2004 9/5/2004 9/5/2004 and I want to summarise this into different cells so that it look like 5/5/2004 7/5/2004 8/5/2004 9/5/2004 i.e. I want to list individual occurances of repeating dates o numbers. Any help would be much appreciated -- Message posted from http://www.ExcelForum.com Sounds like a job or a Pivot Table perhaps? http://www.ozgrid.com/Excel/excel-pivot-tables.htm ** Posted via: http://www.ozgrid.com Excel Templates, Training, Add-ins & Business Software Galore...

creating a program that uses data from a sensor....
Hello, I want to create an MFC program that uses parameter values passed to it from a meter (specifically the resistance in ohms of resisters in an electronic circuit). What are the hardware components that would be needed? And what MFC class(es) would I use to accomplish this? Thanks, RABMissouri2006 On 21 Oct 2006 08:10:50 -0700, "RAB" <rabmissouri@yahoo.com> wrote: >Hello, > >I want to create an MFC program that uses parameter values passed to it >from a meter (specifically the resistance in ohms of resisters in an >electronic circuit). What are the ha...

Data archive with GP Manufacturing
Has anyone had experience with any data archive with GP Manufacturing. The product from Professional Advantage does not support Manufacturing archive, at least not in the documentation. Don't have an answer for you but we will be doing the same in the next week or so. Will report back when done. "DavidInterDyn" wrote: > Has anyone had experience with any data archive with GP Manufacturing. The > product from Professional Advantage does not support Manufacturing archive, > at least not in the documentation. ...

Transfering Outlook Data to a New PC
I've just built a new PC. Currently it has nothing on it other than Windows. When I install Outlook 2003 I'll need to transfer the data from another PC onto it, including all folders, emails and attachments in them and calendar data. What's the easiest and most effective way to do this? Find the PST file and copy it to the new machine and into the appropriate directory, what? Thanks. Copy the pst(s) to the new PC There isnt an appropriate Folder, there is a default folder created when Outlook is installed. http://www.howto-outlook.com/howto/backupandrestore.htm "Marts&q...

thinking about exchange server
Hi I work for a small company (15-20 employees), we currently run windows xp and have an old server. What we want to do is setup shared calendars and contacts so the entire office can access them. This is in Outlook. what I need to know before i go and spend $$ on a new server is, how can this be done? Do I need Microsofts exchange server to accomplish this? Does exchange server run on its own or do i need to setup server 2003 and then put exchange server on it as well? Can this be done without a server (shared contacts and calendar) What is exchange server exactly? is it just an adva...

Locking of entered data
I haev a form that currently allows you to enter new records and edit existing records. My key field is based on a number entered by the user from another system. Once the number is entered I do not want the user to be able to type over that number but still be aloud to add a new record. I tried the AllowAdditions and AllowEdits in the properties but if I set them to Yes AllowAdditions and No AllowEdits then nothing can be changed. I want them to be able to edit everything but the one field containing the number. Ideas? Glenna, The code I provided would go in the two places that I...

New task item for bunch of users to fill in a survey
Created a survey to be filled in by a bunch of users. How can I assign a task item for each of them with the least effort from my part, so they know to fill in the survey? I was thinking of filling a list with all the usernames, then start a workflow that creates the tasks having the "Assigned To" filled in by the list. Is this the right approach, or is there another/easier way I overlook? ~Hans ...

Drag and Drop Records
Hi, I need to create a relationship between two sets of data, Purchase Order and Production Schedule Order. I've reviewed many different ways to get this done but always come back to manual intevention due to the two sets of data being different. So, what I would like to do is create a form with two sub forms, both in datasheet view. The user drags a record from one datasheet to the other, which then updates the two fields in the table being dropped on. Just wondered, is this possible? and if so got any pointers on how to do it... Thanx in advance Marcus ...

how can I split one cell's data into two cells?
I am using Excel as a database, and have a column with cells with a person's name (text) in it...e.g., John Smith. NOW, after the fact, I wish to have a column with just John in it, and another column with just Smith...but I have NO idea how to do this! Help would be appreciated. Thank you. Please refrain from multiposting, you have answers in one of the 4! newsgroups you posted the same question in. Multiposting is frowned upon and even the MS web interface states so -- Regards, Peo Sjoblom Excel 95 - Excel 2007 Northwest Excel Solutions www.nwexcelsolutions.com "It ...