How do you create a mult-record update?

  • Permalink
  • submit to reddit
  • Email
  • Follow


Hello, Accessors

What I would like to do is create a multi-record table update.  I have a
table and a form for it.  I want to modify it so that there is a new field
(textbox) (not bound to a table field) on the form wherein the user enters a
number to specify how many new records to add to the table as opposed to the
1 record which is usually inserted by Access.  How do you do that?

Robert


0
Reply projecttoday (102) 5/21/2004 3:38:04 AM

See related articles to this posting


You should not be adding blank records to your database. Explain to us what you
are trying to accomplish and we will help you out.

--
                                         PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
                              resource@pcdatasheet.com
                                 www.pcdatasheet.com


"Robert" <projecttoday@yahoo.com> wrote in message
news:10aquct6n754nd1@corp.supernews.com...
> Hello, Accessors
>
> What I would like to do is create a multi-record table update.  I have a
> table and a form for it.  I want to modify it so that there is a new field
> (textbox) (not bound to a table field) on the form wherein the user enters a
> number to specify how many new records to add to the table as opposed to the
> 1 record which is usually inserted by Access.  How do you do that?
>
> Robert
>
>


0
Reply spam8773 (270) 5/21/2004 4:36:42 AM

No, they're not blank records.  It's for lottery tickets.  This is what the
user wants.  There would be an auto number incremented for each new record
at the minimum so there would be no duplicate keys.  The user does not want
to store a total number of tickets but instead wants to generate a record
for each ticket and there's nothing I can do about that.

"PC Datatsheet" <spam@nospam.spam> wrote in message
news:uHfrc.23595$KE6.13649@newsread3.news.atl.earthlink.net...
> You should not be adding blank records to your database. Explain to us
what you
> are trying to accomplish and we will help you out.
>
> --
>                                          PC Datasheet
> Your Resource For Help With Access, Excel And Word Applications
>                               resource@pcdatasheet.com
>                                  www.pcdatasheet.com
>
>
> "Robert" <projecttoday@yahoo.com> wrote in message
> news:10aquct6n754nd1@corp.supernews.com...
> > Hello, Accessors
> >
> > What I would like to do is create a multi-record table update.  I have a
> > table and a form for it.  I want to modify it so that there is a new
field
> > (textbox) (not bound to a table field) on the form wherein the user
enters a
> > number to specify how many new records to add to the table as opposed to
the
> > 1 record which is usually inserted by Access.  How do you do that?
> >
> > Robert
> >
> >
>
>


0
Reply projecttoday (102) 5/21/2004 4:52:10 AM

"Robert" <projecttoday@yahoo.com> wrote in message
news:10aquct6n754nd1@corp.supernews.com...
> Hello, Accessors
>
> What I would like to do is create a multi-record table update.  I have a
> table and a form for it.  I want to modify it so that there is a new field
> (textbox) (not bound to a table field) on the form wherein the user enters
a
> number to specify how many new records to add to the table as opposed to
the
> 1 record which is usually inserted by Access.  How do you do that?

Ask yourself how you would create a single record using an unbound
form.  Do that multiple times in a loop.


0
Reply rkc (288) 5/21/2004 11:02:54 AM

Your form needs to be bound to the table where you want to enter the blank
records. Create two textboxes on your form. Name one BlindTextBox and the other
NumBlankRecords. Bind BlindTextBox to a numeric field in your table. You can
make it not visible if you want. NumBlankRecords is unbound. Put the following
code in the AfterUpdate event of NumBlankRecords:

Dim LoopCounter As Integer
  For LoopCounter = 1 To Me!NumBlankRecords
  Me!BlindTextBox = 1
  DoCmd.RunCommand acCmdSaveRecord
  Me!BlindTextBox = Null
  DoCmd.GoToRecord , , acNewRec
Next LoopCounter

--
                                         PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
                              resource@pcdatasheet.com
                                 www.pcdatasheet.com


"Robert" <projecttoday@yahoo.com> wrote in message
news:10ar2o1r5utl252@corp.supernews.com...
> No, they're not blank records.  It's for lottery tickets.  This is what the
> user wants.  There would be an auto number incremented for each new record
> at the minimum so there would be no duplicate keys.  The user does not want
> to store a total number of tickets but instead wants to generate a record
> for each ticket and there's nothing I can do about that.
>
> "PC Datatsheet" <spam@nospam.spam> wrote in message
> news:uHfrc.23595$KE6.13649@newsread3.news.atl.earthlink.net...
> > You should not be adding blank records to your database. Explain to us
> what you
> > are trying to accomplish and we will help you out.
> >
> > --
> >                                          PC Datasheet
> > Your Resource For Help With Access, Excel And Word Applications
> >                               resource@pcdatasheet.com
> >                                  www.pcdatasheet.com
> >
> >
> > "Robert" <projecttoday@yahoo.com> wrote in message
> > news:10aquct6n754nd1@corp.supernews.com...
> > > Hello, Accessors
> > >
> > > What I would like to do is create a multi-record table update.  I have a
> > > table and a form for it.  I want to modify it so that there is a new
> field
> > > (textbox) (not bound to a table field) on the form wherein the user
> enters a
> > > number to specify how many new records to add to the table as opposed to
> the
> > > 1 record which is usually inserted by Access.  How do you do that?
> > >
> > > Robert
> > >
> > >
> >
> >
>
>


0
Reply spam8773 (270) 5/21/2004 11:39:18 AM

Got it!  Thanks, PC.

"PC Datatsheet" <spam@nospam.spam> wrote in message
news:GTlrc.16991$zO3.14332@newsread2.news.atl.earthlink.net...
> Your form needs to be bound to the table where you want to enter the blank
> records. Create two textboxes on your form. Name one BlindTextBox and the
other
> NumBlankRecords. Bind BlindTextBox to a numeric field in your table. You
can
> make it not visible if you want. NumBlankRecords is unbound. Put the
following
> code in the AfterUpdate event of NumBlankRecords:
>
> Dim LoopCounter As Integer
>   For LoopCounter = 1 To Me!NumBlankRecords
>   Me!BlindTextBox = 1
>   DoCmd.RunCommand acCmdSaveRecord
>   Me!BlindTextBox = Null
>   DoCmd.GoToRecord , , acNewRec
> Next LoopCounter
>
> --
>                                          PC Datasheet
> Your Resource For Help With Access, Excel And Word Applications
>                               resource@pcdatasheet.com
>                                  www.pcdatasheet.com
>
>
> "Robert" <projecttoday@yahoo.com> wrote in message
> news:10ar2o1r5utl252@corp.supernews.com...
> > No, they're not blank records.  It's for lottery tickets.  This is what
the
> > user wants.  There would be an auto number incremented for each new
record
> > at the minimum so there would be no duplicate keys.  The user does not
want
> > to store a total number of tickets but instead wants to generate a
record
> > for each ticket and there's nothing I can do about that.
> >
> > "PC Datatsheet" <spam@nospam.spam> wrote in message
> > news:uHfrc.23595$KE6.13649@newsread3.news.atl.earthlink.net...
> > > You should not be adding blank records to your database. Explain to us
> > what you
> > > are trying to accomplish and we will help you out.
> > >
> > > --
> > >                                          PC Datasheet
> > > Your Resource For Help With Access, Excel And Word Applications
> > >                               resource@pcdatasheet.com
> > >                                  www.pcdatasheet.com
> > >
> > >
> > > "Robert" <projecttoday@yahoo.com> wrote in message
> > > news:10aquct6n754nd1@corp.supernews.com...
> > > > Hello, Accessors
> > > >
> > > > What I would like to do is create a multi-record table update.  I
have a
> > > > table and a form for it.  I want to modify it so that there is a new
> > field
> > > > (textbox) (not bound to a table field) on the form wherein the user
> > enters a
> > > > number to specify how many new records to add to the table as
opposed to
> > the
> > > > 1 record which is usually inserted by Access.  How do you do that?
> > > >
> > > > Robert
> > > >
> > > >
> > >
> > >
> >
> >
>
>


0
Reply projecttoday (102) 5/21/2004 6:46:58 PM

The form itself is bound.  I think I would use "DoCmd.RunCommand
acCmdSaveRecord" in that case or maybe INSERT (sql).  Thanks.

"rkc" <rkc@yabba.dabba.do.rochester.rr.bomb> wrote in message
news:yllrc.299379$e17.224306@twister.nyroc.rr.com...
>
> "Robert" <projecttoday@yahoo.com> wrote in message
> news:10aquct6n754nd1@corp.supernews.com...
> > Hello, Accessors
> >
> > What I would like to do is create a multi-record table update.  I have a
> > table and a form for it.  I want to modify it so that there is a new
field
> > (textbox) (not bound to a table field) on the form wherein the user
enters
> a
> > number to specify how many new records to add to the table as opposed to
> the
> > 1 record which is usually inserted by Access.  How do you do that?
>
> Ask yourself how you would create a single record using an unbound
> form.  Do that multiple times in a loop.
>
>


0
Reply projecttoday (102) 5/21/2004 10:05:10 PM
comp.databases.ms-access 42251 articles. 10 followers. Post

6 Replies
82 Views

Similar Articles

[PageSpeed] 18


  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

creating a record lock to ensure that only one user is updating records at a time
Help! I have created an application using vb 6 that allows users (5) to create orders by connecting to s sql database. The only problem is that to often I am getting duplicate order numbers. Here is the code: adopagecounter.Open "select id,pagecounter,pagedate from Mops_counter", db, adOpenDynamic, adLockOptimistic dateformat = Format(adopagecounter.Fields("pagedate"), "ddddd") If dateformat <> dateformat2 Then adopagecounter.Fields("pagedate") = dateformat2: adopagecounter.Fields("pagecounter") = 1 mopscounter = adopagecounter.Fields(&...

Creating Multiple Record Update Forms
Hi, I'm considering moving a payroll application out of Microsoft Access to some web-based solution. It is getting way to big for Access and the system is growing unstable, so I'm learning PHP and MySQL and things are looking very promising. There is one piece of this I am having problems with. The attendance module shows users all their employees in a table and allows them edit it this way. My users need to be able to see and update all their employee records at once, and they need to do it quickly, so they can't wait to load one employee at a time. So they would see something...

Automatically create new record to related table on update
Hi, first time posting to this group, but I have followed advice and examples for several months, so thank you. I work for a small telecommunications company. I have a simple Orders database that has an Orders table to track a sales order, using OrdersID as the PK. I have a related one-to-many table called OrderDetails, with the OrdersID as a FK, which shows all the products sold with that order. Then I have an Update table, in a one-to-many relationship with the OrderDetails table (OrderDetailID is FK in Update table). This table is used to track the status of each product as it flows throug...

Linked Tables Path Updated
Hello- I created a MS Access 2002 database with linked tables on a SQL Server database by way of a File DSN, A. I have created a form which points to one of the linked tables. After I finished testing it in the development environment I updated the path for all the linked tables to a new File DSN, B. After this action, I opened the form to test adding a new record and the "add new record" navigation button has been disabled. Can anyone help? I need to be able to add new records through the form and can't figure out why I am now NOT able to add a record. PLEASE HELP!! Thank you,...

Insert & Update triggers fire together when a new record is created.
Hi, I have two triggers, one when an insert is performed and the other when an update is performed. I use these triggers to synchronize two billing systems. So when a new account is created I update a temp table with a tag of 'NEW' and when a account is modified I send it with a tag of 'CHG'. But I create a new record both of the triggers fire and I get both the tags 'NEW' and 'CHG' in my temp table. Is there a way I could avoid this only when I am creating new accounts. I would be grateful if someone could help me. Thanks in advance. Thanks Yogi It shouldn&#...

Tie::DBI problem -> new record is created instead of updating existing one
Hi group, This was posted a week ago on c.l.p.modules. Since I did not get any answers, decided to post here as well. Apologies in advance for the ugly cross-posting. Example taken with modiications from http://search.cpan.org/~lds/Tie-DBI-0.93/lib/Tie/DBI.pm I'm running Windows XP, MySQL server 3.23.49, ActiveState Perl 631 and the following relevant modules: DBD-mysql [2.1026 ] A MySQL driver for the Perl5 Database Interface (DBI) DBI [1.37 ] Database independent interface for Perl Tie-DBI [0.93 ] I created a MySQL test database as fo...

Creating a record of records
Hi there, I need to have a table which is a list of records (Like a subscription), one for each user and in that record is a list of all of the records they have attached to them. The max number is unknown What is the best way to do this. Can I create a set of record ID's within a column or is there another way to store this data. In the past I have created a new record for each item in the list, but I have had problems in manipulating them afterward. Any ideas? Cheers Steven deepweb: > Hi there, Hi Steven, > > I need to have a table which is a list of records (Like a ...

UPDATE functions updates all records instead of error records, trap for control characters
I am uploading files for a conversion. I would like to know why the set_error_flag function doesn't work. I don't get a returned error message but all the error_flags are set to 1. I inserted some ndc values into the inventory table from the link table to make sure there was at least a few that aren't errors in the data but a select shows all records are marked with 1. The error function purpose is to flag those that have no match so the ndc value can be added so it will match the link table. if ($_POST['cart_id'] && $_POST['bu'] && move_uploaded...

update record only if it is new record
there is a quantity update on lost focus even of the text box i.e. it update quantity when it lost focus. Now I want this even work only if I click in this text box or if entring a new record. Any one know how to do that. rashid_jan@excite.com wrote: > there is a quantity update on lost focus even of the text box i.e. it > update quantity when it lost focus. Now I want this even work only if > I click in this text box or if entring a new record. Any one know how > to do that. That is almost certainly a bad event to use. What if the user never enters the TextBox? What if they a...

update record when record is deleted
I want QTY on hand to be updated when record in detail sale is deleted. can any one help "khan" <ahmad336@gmail.com> schreef in bericht = news:1115665339.851235.101690@o13g2000cwo.googlegroups.com... >I want QTY on hand to be updated when record in detail sale is deleted. > can any one help > IMO helping you is just a waste of time ... I won't help you again, = promised. Arno R ...

How To create a program That accept file of different Record Length & create a file with the same record length as the input one
Hi guys, I have a technical question. I want to create a cobol program which accept a File (FB, of any record length [from 1 to 2000) and create a output file with the same format as the input one All the record in the file have the same length, so i don't want to deal with VB file. I just want to know if somebody know how i'm suppose to declare the FD statement. And in the JCL how i'm suppose to the declare the input and output file. Thanks for your help guys From the uses of the terms "FB" and "VB" my guess is that this is an IBM mainframe question. If ...

looping through records and updating specific records
My code below will loop through all the records in the table, and when the if statement is true it goes to the ***Me.ContainerNumberProductsTable = GETContainerNumber.Value*** bit like should but it does not make the change/update in the table. Any ideas? Dim rst As Object Set rst = Me.Recordset.Clone If Not rst.EOF Then Me.Bookmark = rst.Bookmark varKeepGoing = [PalletNumberContainerFormComboBox] Dim Found As Boolean Do While Not rst.EOF If rst("PalletNumberProductsTable") = varKeepGoing Then Me.ContainerNumberProductsTable = GETContainerNumber.Value End If rst.MoveNe...

User name update on record update
Hi all, I have a contacts database that many people use. I have a field that grabs the user name and date and records these with each record when it is added or changed. The thing is Fm grabs the user name of the computer eg the login name for the workstation, not the user name of the individual who logs into the database. What am I missing here? Using FM7 Server and workstations Bignoel Yes, that's the way FM works. So you'd better make a 'Users' table, and show it when opening the base, then make mandatory that they choose a name (hopefully theirs ...) before proceedin...

How Do I create a new record from an existing record
We have a Job Shop database. When I get an order in I put all the line item information into the database. Some orders have multiple lines and most of the information is the same. (eg. Customer Name, PO, Due Date, Received, etc.) 2 questions: 1. I have a button to create a new record on my switchboard, but what I would like that button to do is create a new record but enter in the next job number. Our job numbers are 'H1001', so I would need the button to search to the end of the DB find the last job number, add one to it, and then plug it into the new record when it opens up. 2...

record update to a record in another table..?
Hello, I have a form linking two tables but they have one field that is shared called "device" I want to allow data input into one of the fields and hide the other (so I need it automatically updated from the first record). How do I have the second record in the separate table updated based on the change or update of the first record? I am probably missing something really stupid and easy! Hope I explained that clearly!! TIA J.B.> On 9 Jul 2004 00:16:00 -0700, stu-art@excite.com (Joe Bloggs) wrote: >Hello, > > I have a form linking two tables but they have o...

Help in keep records while updating the records
Hi friends I need Help in keep records while updating the records. My prob is that i cant able to keep the version of records. i m working on a website project. For that purpose we hav to keep the version of records. each time update the record it will update it that for sure but it will also keep the duplicate cate copy of the record tht is being updated. in out table we have "ID" as primery key and "version" as another unique key I m trying that when ever i update the record it will keep the backup of the record is being updated and also updates the record. the updated r...

Creating monthly records from effective date records
I need help with this apparently simple problem. I have a table with the following records: Effective_Date Commodity Price 10/1/2005 0 5/1/2006 2750 10/1/2006 0 Now I need to generate the following monthly records using the above table: Date Commodity Price 1/1/2006 0 2/1/2006 0 3/1/2006 0 4/1/2006 0 5/1/2006 2750 6/1/2006 2750 7/1/2006 2750 8/1/2006 2750 9/1/2006 2750 10/1/2006 0 11/1/2006 0 12/1/2006 0 I found a way to create this data but it is highly inefficient as it involves 3 queries (nested). Since I am dealing with a significant number of reco...

updating multiple records with update query or vb
Hi, Is there any way to update multiple records in one go with access (either update query or vb). Sort of IF statement where I can choose, for example, IF CASE=120700828 AND AR001A=4 THEN AR09YR=0; IF CASE=317308101 AND AR001A=8 THEN AR09YR=0; IF CASE=357125319 AND AR001A=12 THEN DO; AR09YR=0; AR09MTH=10; END; (CASE, AR001A and AR09YR = name of table fields) I have playing around with the SWITCH command, but the problem is I dont want records apart from the one specified get update. Thanks in advanced -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Some other solutions: ...

Go to related record creates new record?
In a portal I have a button that with Go to related record attached (it also sets some globals in the related file, and goes to a layout in there too). The button will create a new record if you click it on the last portal row. Does this sound like normal behavior or not? Because I can't duplicate it. I've got another two portals, and they won't create a new record from the go to related record function. I can type in the portal row alright to make a new record, but the button won't do it. I've spent some hours trying to diagnose this problem. I don't desire on...

Updates-Modified records,Insertion-New records
Dear SAS Users, I have two datasets. One source and one target. source target PID NAME CITY PID NAME CITY 3 Allen Dallas 3 Allen Dallas 4 Nancy Texas 4 Nancy Texas 1 Smith Washington 1 Smith Washington 2 Ford New York 2 Ford New York My requirement is, If a record is modified in source, it has to be upgraded in target. If a new record is added in source it has to be updated to the target. Help me to code in sql. Thanks. ...

Weird problem: Update statement updating records it should not
We recently upgraded to 10g. An update statement that previously worked fine is giving an error. Having looked at what it's doing all I can say is it's very weird The syntax of the update is: update table1 -- THIS UPDATES 54 RECORDS set (field1, field2, field3) = ( select field4, field5, 1 from table2, table3 where table2.field4 = table3.field5 and table1.field1 = table2.field4 ) where table1.field1 in ( select field4 -- THIS RETURNS 45 record keys from table2, table3 where table2.field4 = table3.field5 ); Field...

Creating blank records with sequential record numbers
Hello! I'm pretty sure this is an easy thing to do but I cant still figure out how. I have a table with about 20 columns, one column being the record_number. I want to insert 100'000 new records with 1, 2, 3, 4 .... 100'000 in the record_number field. All the other columns can be left at nulls or whatever the default is. Right now I'm doing this using a "for" loop in my app. Not very fast or smart Any better ideas ? Thanks /Otto Blomqvist On Thu, 2004-08-05 at 12:55, Otto Blomqvist wrote: > Hello! > > I'm pretty sure this is an e...

SAS: update missing data in one record from other records
Dear list, I have a database with lots of missing data in random variables. I have cleaned up the data by converting everything to uppercase and correcting misspellings. Unfortunately, random pieces of the data are missing, e.g. in one record state is missing and in another the station is missing. I would like to learn a method were I could use a data from one record to fill in the missing values for any records where possible (I accept and not all records can be fixed). Here is some sample data: data banding_data; input band_no 1-2 station $ 4 city $ 5-6 county $ 8-10 state $ 12-15 zip...

Access Database update with pstmt.executeUpdate(), no record updated.
I testing pstmt.executeUpdate();, found that the Access does not update. What wrong ? Where cnt is integer,pt_part is String. C:\Example\javaux\jdbc>java access_update Update pt_mstr set cnt = ? where pt_part = ? C:\Example\javaux\jdbc> //* access_update.java 2006/08/14 eric.leung * * Source : HOME * */ import java.sql.*; import java.lang.*; public class access_update { public static void main(String args[]) { // eric_jsp is ODBC User DNS // String url = "jdbc:odbc:eric_jsp"; // Using DSNless connection String url = "&qu...