Re: Adding multiple records at once..Is it possible?
- From: diaare <diaare@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 9 May 2007 09:15:01 -0700
Thanks for the quick response. Unfortunately it is a little beyond my
experience....
Would you mind giving me a few more details. While I understand what and
how to use an append query on a basic level, I have never used one in a form.
I think I need to use the query builder on the forms recordsouce to make it
an append query but my problem is that the mainforms controls are
unbound...and the subform is bound to the table I want to update.
Do I need to change the controls on the mainform to bound controls of a new
query...or am I way off base?
"Arvin Meyer [MVP]" wrote:
You can do it in 2 ways:.
1. Create a recordset in code, and loop through it adding the new records
using the AddNew method.
2. Use an append query.
The second is fastest and can be run manually from a query, as well as from
code.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
"diaare" <diaare@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A1DAF2A6-D6A1-4009-B4CC-1941F0FC9A3C@xxxxxxxxxxxxxxxx
My subform updates a table set up to track commodity increases. Each
Vendor
has a commodityID that helps to group vendors that sell like commodities
together.
Currently my main form has three cascading boxes (2 combo, one list):
cboBaseComm, cboSecComm, and lstVendorID
The subform is linked to the main form by VendorID, VendorName, and
SecCommID and once the user selects a Vendor from the list box these
fields
populate the subform of the new record. Then the user can enter the
estimated increase %,and date of increase, and reason.
So far all of this works as I intended. But, most of the time...the
increase %, date, and reason, for each vendor in the list box are the
exact
same (because the list box only shows vendors with the same
CommodityID...ie:if steel goes up 3%, then all the vendors with the
CommodityID of steel will go up 3%, on the same date, for the same reason)
Currently the user has to select each vendor in the list box individually
to
create the new records for each of them.
Is there a way to be able to tell the form that I want a new record
created
for all vendors with X CommID and each new record have X % change, on X
date, for X reason? And, still have the option to select the vendors
individually if by chance the data is different on that specific CommID.
I realize I may have to do some backtracking to make this change...but I
think in the end it will be worth it.
Thanks
Diane
- Follow-Ups:
- Re: Adding multiple records at once..Is it possible?
- From: Arvin Meyer [MVP]
- Re: Adding multiple records at once..Is it possible?
- References:
- Re: Adding multiple records at once..Is it possible?
- From: Arvin Meyer [MVP]
- Re: Adding multiple records at once..Is it possible?
- Prev by Date: Re: Required field added to existing records
- Next by Date: Re: Multi-Select list box on a Data Entry Form
- Previous by thread: Re: Adding multiple records at once..Is it possible?
- Next by thread: Re: Adding multiple records at once..Is it possible?
- Index(es):
Relevant Pages
|