Re: Adding multiple records at once..Is it possible?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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




.



Relevant Pages

  • Re: Adding multiple records at once..Is it possible?
    ... You could, however, fill a bound subform with data filtered by the VendorID ... The easiest way for an inexperienced person to use an append query in code ... has a commodityID that helps to group vendors that sell like ... estimated increase %,and date of increase, and reason. ...
    (microsoft.public.access.forms)
  • Re: Adding multiple records at once..Is it possible?
    ... has a commodityID that helps to group vendors that sell like commodities ... estimated increase %,and date of increase, and reason. ... CommodityID of steel will go up 3%, on the same date, for the same reason) ... individually if by chance the data is different on that specific CommID. ...
    (microsoft.public.access.forms)
  • Re: Best Camera for NIght Shots?
    ... John's still "wasting his time" by trolling wtih indirect responses. ... The reason why I mentioned its age at all is to dislose that I'm ... bleeding edge feature, so a few vendors with something different are ... that some P&S vendors have dramatically improved shutter lag. ...
    (rec.photo.digital)
  • Re: [ANNOUNCE] ACPI BIOS Guideline for Linux
    ... and makes it easier for vendors to provide Windows support. ... been the hard bit of the drivers I've written. ... If you really have to use WMI for Windows compatibility reason, ...
    (Linux-Kernel)
  • Re: Why Are Main Line Services Faster Than 125mph Such A Big Ask?
    ... investing in the radio network. ... There is also the reason that in the current deployment of ETCS in ... locomotives from different vendors did not really work ... well with certain line implementations of ETCS from other vendors. ...
    (uk.railway)