By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,099 Members | 2,156 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,099 IT Pros & Developers. It's quick & easy.

How do you create a mult-record update?

P: n/a
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
Nov 12 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
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
re******@pcdatasheet.com
www.pcdatasheet.com
"Robert" <pr**********@yahoo.com> wrote in message
news:10*************@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

Nov 12 '05 #2

P: n/a
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" <sp**@nospam.spam> wrote in message
news:uH*******************@newsread3.news.atl.eart hlink.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
re******@pcdatasheet.com
www.pcdatasheet.com
"Robert" <pr**********@yahoo.com> wrote in message
news:10*************@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


Nov 12 '05 #3

P: n/a
rkc

"Robert" <pr**********@yahoo.com> wrote in message
news:10*************@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.
Nov 12 '05 #4

P: n/a
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
re******@pcdatasheet.com
www.pcdatasheet.com
"Robert" <pr**********@yahoo.com> wrote in message
news:10*************@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" <sp**@nospam.spam> wrote in message
news:uH*******************@newsread3.news.atl.eart hlink.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
re******@pcdatasheet.com
www.pcdatasheet.com
"Robert" <pr**********@yahoo.com> wrote in message
news:10*************@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



Nov 12 '05 #5

P: n/a
Got it! Thanks, PC.

"PC Datatsheet" <sp**@nospam.spam> wrote in message
news:GT*******************@newsread2.news.atl.eart hlink.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
re******@pcdatasheet.com
www.pcdatasheet.com
"Robert" <pr**********@yahoo.com> wrote in message
news:10*************@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" <sp**@nospam.spam> wrote in message
news:uH*******************@newsread3.news.atl.eart hlink.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
re******@pcdatasheet.com
www.pcdatasheet.com
"Robert" <pr**********@yahoo.com> wrote in message
news:10*************@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
>
>



Nov 13 '05 #6

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

"rkc" <rk*@yabba.dabba.do.rochester.rr.bomb> wrote in message
news:yl*********************@twister.nyroc.rr.com. ..

"Robert" <pr**********@yahoo.com> wrote in message
news:10*************@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.

Nov 13 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.