How do you create a mult-record update?

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
projecttoday (102)
5/21/2004 3:38:04 AM
comp.databases.ms-access 42535 articles. 0 followers. Post Follow

6 Replies
194 Views

Similar Articles

[PageSpeed] 6

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
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
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
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
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
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
projecttoday (102)
5/21/2004 10:05:10 PM
Reply:

Similar Artilces:

Create MS/ACCESS database app for non-ms/access users
Is it possible to create an MS/ACCESS database application and package it for users who do not have MS/ACCESS loaded in their PCs? I was told that this is possible, but I don't know what software is needed. Do you know? If so, please answer this post. Thanks. SueB *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! Per Sue Bricker: >Is it possible to create an MS/ACCESS database application and package >it for users who do not have MS/ACCESS loaded in their PCs? > >I was told that this is possible, but...

Ms Access frontend / Oracle backend problem
Hi all, I'm developing a database using Ms Access 97 as the frontend and Oracle 8.17 as the backend under win2k os. Using Oracle ODBC to link the tables in Ms Access. This database is supposed to be used by 10 users at anyone time. Everything else is working as I expected but one. The one problem is, everytime I update or insert records using SQL*Plus, the changes or the new records do not show when I open the linked table in Ms Access frontend. I had to restart my computer before the table in Ms Access showed the correct records/data. Has anyone else had the same problem? ...

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...

ms-access database cannot be updated
I have a ms-access application. The front end is ms-access and the backend is SQL Server. Originallly it worked well on windows 2000 machine. After the machine is re-imaged to windows xp machine. The application cannot be updated. All the textbox or dropdownlist become readonly. There are no particular error message. The screen is just freeze when you are trying to do update. Can someone help with this issue? Thanks! ...

How to delete a record in an Ms Access Database
Dear Community, I connected Matlab with an Ms Access databse. I already found out how to import, export and update Data my Ms Access Database via the Database Tollbox. But how can I delete a record in Ms Access via Matlab? Thanks for any help! Eric "Eric " > Dear Community, > > I connected Matlab with an Ms Access databse. I already found out how to import, export and update Data my Ms Access Database via the Database Tollbox. But how can I delete a record in Ms Access via Matlab? > > Thanks for any help! > > Eric exec(conn,'delete from myTable whe...

Display records from MS Access Database
Hi I am trying to display a few records from MS Access but I keep getting an error stating: System.Data.OleDb.OleDbException: The Microsoft Jet database engine cannot find the input table or query 'MailingList'. Make sure it exists and that its name is spelled correctly. I have a database called test.mdb with a table called MailingList, which contains the following data: MailinList MailingListID FirstName LastName WorkPhone EmailAddress 1 Homer Simpson 212K345835 hsimpson@snp.com 2 Carl Carlson 212K352981 ccarlson@snp.com 3 ...

Updating MS-Access Database query
hello i need to update my MS-Access database thru matlab. when using the following code using function "updates" it updates the database i.e .......whereClause = 'where month = ''Nov'''..... Here "Nov" is an entry in the database. Now when i assign a variable to the months..ie variable name "MNTH" could contain Jan /Feb etc,.....and i want to pass the variable "MNTH" ie .......whereClause = 'where month = ''MNTH'''..... it DOES NOT update the database and i receive the error .....error in horxcat......

UPDATING MS Access database problem
Hi! Why does my database not update? Code: //////////////////////////////// Connection con; ms_database = "jdbc:odbc:knjiznica"; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection (ms_database, "", ""); Statement st= con.createStatement(); int rs = st.executeUpdate("UPDATE TABLE SET date='"+ date +"' WHERE number = "+ num +""); ///////////////////////////// There's no exception but also no result in database... date is a String type, num is int Plea...

Updating a record from Access to an SQL 2005 database
I have an access form that connects to a database on a main server. These forms stay open for a long length of time (a couple hours) and then the user finishes with them and closes the form. The problem that has been occurring is that sometimes for whatever reason the connection to the server is broken and when the sheet is closed the data is trying to commit to the database and can't. Is there a setting to commit data to the database as soon as it is entered into a field and not when the full record is closed/committed? Or is there any other way to protect myself from this lose of data...

Libname method to create MS ACCESS database?
Hi there, OK, I know that I can added tables into an exsiting MS ACCESS database: libname xx access "g:\xxx\xx.mdb"; data xx.junk; set sashelp.class; run; Where xx.mdb already there. What about if there is no database file yet, can I create a database using libname method? I tried the following but failed: libname xx access "g:\xxx\yy.mdb"; data xx.junk; set sashelp.class; run; ERROR: Connect: Could not find file 'g:\xxx\yy.mdb'. ERROR: Error in the LIBNAME statement. Thanks Ya ...

Not update record using Navigator in MS Access
Hello there, I have a bound-form using Navigator so that the user can move back and forth to update record in the form. Every time a record was modified and the user clicks the Navigator to either move backward or forward to the next record, a message is popped up asking the user to confirm the change. If the user clicks "Yes", the record should be updated and the Navigator takes the user to the next record as clicked. If the user does not want that change (clicks "No"), the record should not be updated and still move backward or forward as the user chosed so. So, I th...

Creating MS Access databases with VB (.net)
Hello, I am trying to create MS Access databases using VB .net. I can create MS Access 2000 databases OK but also want to create (using VB .net code) 97 format MS Access databases as well. Was using ADOX but the create statement has no parameters for access format and just creates database to whatever format of access you have installed. --- CODE START --- Dim cat As New ADOX.Catalog() Dim sCreateString As String sCreateString = _ "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Test.mdb" cat.Create(sCreateString) --- CODE END --- Cheers Paul M Let me steal from a regul...

add/update records C# Access database
I write a software in C# that updates an Access database. This database is being updated by other software in parallel. I would like to add a record or to update a record and I am not sure what the best way to do it. As far as I understand there are 3 options: 1. To open the whole table =96 but in order to add one record do I really need to read the whole other 2 million records? 2. To run a query that will return me a part of the table =96 I find in inefficient to run a query on the whole database so I can add a record. 3. To add a record using SQL statement (INSERT INTO) =96 doesn=92t look e...

Creating a MS Access type database for VB6
Is there some VB6 code I can use to create a MS Access type database or do I need to own a copy of MS Access in order to create a Database for my program? Delphi had a database creator program I was hoping that VB6 would also have a utility for creating a database. Regards Brian On Sun, 02 May 2004 17:43:40 +1200, Brian <bclark@es.co.nz> wrote: >Is there some VB6 code I can use to create a MS Access type database >or do I need to own a copy of MS Access in order to create a Database >for my program? >Delphi had a database creator program I was hoping that VB6 w...

Web resources about - How do you create a mult-record update? - comp.databases.ms-access

Resources last updated: 2/13/2016 12:36:09 PM