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
2215 Views

Similar Articles

[PageSpeed] 31

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:

OL2003 notifies of new mail, takes 5+ min to pull in
Running XP, Office 2003 on 3 ghz pc, 1 gb ram. We do not have any Microsoft product on the back end, just on the desktop. Email is configured as pop mail. OL notifies me with sound and envelope that there is new mail, it takes the email 5 minutes or longer to be displayed. Pressing Send/Receive does not pull it in. My Eudora client is instantaneous, so it is not a network issue, this is strictly OL ?? ...

Counting Records in A Group
I have a table that has one row per email sent in by a student, organized by the class they attend. I would like to count the number of students that have sent in emails per class. I can't seem to get my brain around this, and what I get every time is either the number of emails per class or the number of emails per student. My Table: [Publish Table] Columns: [Course Name] = name of class,[People ID]=identifier for the student,[Email ID]=identifier for the email in a different table I've tried this query - gives me a row per student and the number of emails for the s...

Use Form button to move current record to another table
I have a database which consists of computer names and model numbers. As time goes on the computers get old and are no longer in use. I also have an identical table that I have been copying the old computers to. Once copied to the old computer database I delete the computer record from the current computer database. Is it possible to accomplish this task with one button? Say you had a button on each record called cmdArchive, and it's purpose is to move this record to an archive table, and delete that same entry from your current table. Each record should have a unique identifying ...

Finding duplicates in column
Hi, I have Excel 2002 and have 6000 emails addresses in a column. How can I find if there are any duplicates in that column? Thanks rock Assuming the data is in column A, add a formula in column B of =IF(COUNTIF($A$1:$A1,$A1)>1,"Duplicate","") Cpy that down, then you can filter column B for Duplicate Sorry to be so newby Bob, but when you say 'copy' down, what exactly do you mean? I have entered the formula in B1 but.. Thanks rock Bob Phillips wrote: > Assuming the data is in column A, add a formula in column B of > > =IF(COUNTI...

Convert single colum/multiple rows to multiple colums.
Hi, I have a .dat file when opened with Excel it has 1 column and 7 rows per entry. I would like to delete some rows and convert the rest to something like. Any chance this can be done. It's quite large. 51,793 rows. TIA Jeff Col 1 Col 2 Col 3 Name Date Lenny Kravitz - 2000 - Greatest Hits -- Table: {2} { "music" "Name", "06/04/2008", "Lenny Kravitz - 2000 - Greatest Hits", }, --Table: {3} etc. etc. ...

Numbers in a text field-can I add them up?
Hi everyone! Using A02 on XP. I have a table of data with survey response fields that contain a 0,1,2,3,4 or 5. However, the fields are formatted as text, not numbers. I need to add up certain blocks (Items 1-6, Items 7-23, etc.) and then do some averaging. I cannot change the field types from text. Must I append to a new table or can I do something right in my query? I've got one field in my query like this: ES: [Item1]+[Item2]+[Item3]+[Item4]+[Item5]+[Item6] My result is: 553453 or 554444, etc. I want: 25 or 22, etc. I would really appreciate any help or advice. Thanks...

Ho to make one field required based on critera of another field?
I'm creating a form and need to make the "comments" field required if the "code" field is =>20. I appreciate suggestions! Deadline Monster is lurking! User enters the job processing endcode value (numeric) into the "code" field. If the endcode is =>20, comments are required. (P.S. I don't know VB) Thanks! Star You would put your validation code in the Form's BeforeUpdate event. If Me.EndCode >19 Then If Len(Me.Comments & "") = 0 Then MsgBox "Comments are required" Cancel = True End If End If ...

Passing data from one form to another
Hello I have a form called frmMaindB and it has 5 text boxes on it (txtEmployeeTime, txtDTRegular, txtDTReason1, txtDTReason2, txtDTMaintenance) when I double click on the text box it opens up a pop up form named frm_DecimalConversion. On this form I have two text boxes one box I enter data into and the other calculates or converts the data to a decimal. The box that converts the data is called txtDecimal. Then I have a close button which I want to use to close the pop up form and insert the data into the text box I double clicked in to get the pop up or (frm_DecimalConversion). I have r...

data value in Form field if no table entry
I have a form with a field which pulls through and concentenates 2 fields called [ContactFirstname] and [ContactLastName]from my table There are however some customers for whom I do not have names and therefore instead I would like Sir/Madam to appear in the field in the form I think I have seen this done somewhere using ELSE? but can't find it Any help/ideas gratefully received Perhaps something like this: Nz(Trim([ContactFirstname] & " " + [ContactLastName]), "Sir/Madam") -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access use...

Multiple Outlook #2
I imported an Outlook 2000 pst file into Outlook 2003. Now when I open Outlook my Personal Folders appears 4 times in the left hand "All Mail Folders" When I close Outlook it gives me an error and msvbvm60.dll is mentioned. Any help on how to correct this issue would be greatly appreciated. Mick ...

How do I set the number format to Base 12?
I would like to change the number format on my spreadsheet from Base 10 to Base 12, eg. 12 bottles makes up 1 case. Therefore, if I were adding up three different cells 9 bottles + 11 bottles + 6 bottles, my result should be 2 cases 2 bottles if possible 2.2 in a case column. See http://www.cpearson.com/excel/fractional.htm for details. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Andrew Moore" <AndrewMoore@discussions.microsoft.com> wrote in message news:893CABE9-37D7-4E6B-8A7E-A5E679C8C824@microsoft.com... >...

Printing Multiple Copies #4
Hi all - I am using Vista Business and Publisher 2007 from the Office 2007 Small Business package. No matter what type of publication or template I use I can only print single copies. Most recently I tried to print 30 copies of a single page flyer and had to do it a single copy at a time. If I go to File|Print and set the number of copies to 30, I still get a single copy only. Does anyone have any thoughts? Thanks -- Andrew Aitchison (amhsn@nospam.sympatico.ca) Is your printer driver current? What is the default in the printing preferences in the control panel printer folder? ...

Printing Multiple Receipts at a Time From Journal
Hey guys, Is there a way to print multiple journaled receipts at a time? Say all receipts for a batch or by date or other criteria? Thanks Tom, Not that I've seen. -- = Get Secure! - www.microsoft.com/security You must be using Outlook Express or some other type of newsgroup reader to see and download the file attachment. If you are not using a reader, follow the link below to setup Outlook Express. Click on "Open with newsreader" under the MS Retail Management System on the right. http://tinyurl.com/75bgz ========== "Tom Bombadill" <Genius_pos...

Help ! formatting data to text
I am creating data in an Excel spreadsheet. I then want to get that data into a simple text email. I have some problems and questions... 1) how do I get the columns of data to line up evenly when I copy the data to email text ? Keep in mind I need to be in simple text format, not HTML or rich text. Every time I do this, all columns become chaos and are unreadable. 2) Is there a simple way to automate the creation of an email from an excel file ? this is less important to me. Thanks in advance WxMachine #1. I think it may have to do with what email client you use, too. I copy and ...

How can I stop charts from refreshing when changing source data?
My problem is, that I am working with a lot of data and when I change some of the ranges all charts in my view refreshes and it takes much time. My pc is aP4 3GHz, 2GB RAM so that should not be the bottleneck. Is there any way to force the charts not to update all the time? ...

New emails with attachments not being delivered
When I send a NEW email with an attachment to my husband, it is NOT getting delivered, however, when I FORWARD an email with an attachment, it IS being delivered. I've tried sending different types of attachments (Word, JPG, Acrobat) and it doesn't seem to matter. None of them (as new messages) are delivered. I can send the same message to his home computer and it gets delivered, it's just his work Outlook that seems to be the problem. My email address is on his list of safe senders. He can receive emails with attachments from others, including his home compute...

how do I remove fx from the function line, can't enter data
I have the fx displayed just under my toolbar, and I can't enter or change data in any of the cells in the file. I can't get the red X, the Green check mark, or the black = sign to appear. There are very few areas that are not "greyed out" under the headings at the top. This situation applies to all of the excel files on this computer. I have Excel 2000. Please help. Can you move the cursor around anywhere in the spreadsheet? "dmdranch" wrote: > I have the fx displayed just under my toolbar, and I can't enter or change > data in any of the c...

multiple revieve of emails
I recieve multiple copys of emails in outlook. In some cases I get 100 copys of the exact same message, in other cases it is ok, then others many times Only one message on server Jim <anonymous@discussions.microsoft.com> wrote: > I recieve multiple copys of emails in outlook. In some > cases I get 100 copys of the exact same message, in other > cases it is ok, then others many times Only one message on > server Usually caused by 1) Send/receive interval too small or 2) server timeout value too small or 3) rules that don't contain the "stop processing more rules...

Multiple Account Download from One Financial Instituition
Hi, I have at one brokerage mutliple accounts (individual, joint, 401K, roll-over etc). In Money they are all separate accounts. When I connect with the brokerage I am only able to connect to one type of account (in this case retirement). How can I download multiple accounts from a brokerage (when not all have the same URL). Please email me your reply. Thanks Sandeep ...

Just installed new hard drive
I just installed a new hard drive and used the drive's utility program to copy everything from my old drive to the new one. Now Outlook isn't going out to my ISP's server and getting my new messages, and when I send a message I get the "no transport provider available" error. (My connection's just fine.) I looked online for some help. One recommendation was to delete the Personal Folder and create a new one. I did that, but then all the messages I had disappeared and it freaked me out so I didn't want to mess with anything else. How can I make it work ...

how do i recover data in publisher
i have been entering addresses to set up a mail merge. i cllicked the "ok" button in the window and lost all data . can i recover it Look in a folder in My Documents named "My Data Sources". Publisher data is saved as .mdb(Access) file. Did you try selecting "Edit Address List" in the Mailings and Catalog menu (Tools)? -- Mary Sauer http://msauer.mvps.org/ "dee" <dee@discussions.microsoft.com> wrote in message news:690430F1-36DE-47EE-8B7D-DD12A096C075@microsoft.com... >i have been entering addresses to set up a mail merge. i cllicked ...

HELP
We have an application that is used by over 8000 people worldwide. One of our users is just starting to have the following problem: Run-time error '-2147467259(80004005)': Method 'Add' of object 'CommandBarControls' failed I have read that this problem can be caused by trying to open the file in Internet Explorer. The user has told me that she has tried opening MS Excel and then the .xls file and she still gets the same problem when the file is trying to open. She is the only one that has had this problem. Could there be something wrong with her Excel settings or som...

Constructing Hyperlink from the Database Record fields
I am working on a Windows XP environment using MS Office 2007 including Access 2007. I want to open a document from Access 2007 which I can easily do with Hyperlink type field. However since all the necessary information is already in the Database Record I try to avoid creating additional field which would be a Hyperlink type on the Form unless it is absolutely necessary. Below is the code that I have to construct the FullFileName which consisted of ServerName, Division, Unit, RequirementDirectory, FolderName and the FileName itself. As you can see the Database records has al...

Using subtotals as single data entries
Sorry about the subject--I couldn't figure out how to describe it simply. I have a large file (16,000 records) of amounts billed by roughly 10,000 service providers. A number of these providers have multiple office locations, so each record is unique to a specific office location. In other words, a provider who billed from 3 different office locations will have 3 entries. Each provider has a unique provider ID number, which stays the same regardless of which office location he is billing from. I want to be able to subtotal the amount billed by each provider for all their office locations...

Count Unique Items with Multiple Criteria
I am trying to get a list of how many lots a particular car model is on. For example, say we have a spreadsheet that looks like: Model License Lot Ford xjd-394 1 Chevy gwg-394 2 Ford sdf-333 1 Ford lkj-111 3 Toyota skd-333 4 Toyota shk-584 4 I am loking for a way to get data that says how many unique lots each car is on, so for example: Ford: 2 Chevy: 1 Toyota: 1 I was trying to do this with Pivot tables and the count functionality, but it isn't quite getting me the results I want. I can get the results with a pivot table ...