HAZ-How to add selected records in one subform to another subform?

H

Hazbones

I have a form where employees can create a chemical inventory. The main form
(FMAIN) has fields to input employee name, location, etc.. There are two
subforms on FMain. One subform, (FInv) will contain the employee's chemical
inventory, is related to the FMain table via (MainID). The second subform,
(FList) is on the Fmain form but not related to anything.

Fields I have:
FMain: [MainID] (AutoNum), [Name] (Text), [Location] (Text)
FInv: [InvID] (AutoNum), [MainID] (Num), [Chemicals] (Text)
FList: [ListID] (AutoNum), [Chemicallist] (Text), [Add] (checkbox)

Objects I have:
Command button named [Accept]

This is what I want to happen...
The FList subform shows two fields named [Add] and [Chemical List]. The
employee wants to click the checkboxes next to the chemicals in FList subform
and then click a command button (Accept) on FMain that will copy and paste
the selected chemicals as new records in FInv. It should work in a simple
two step process to create the inventory... select the chemicals in FList,
click the command button (Accept), and he should see those selected items
appear in his inventory list (FList). I don't want the chemicals listed in
FList to be deleted or moved. Instead, just send a copy of those selected
chemicals to the FInv subform.

What is the best method to make this happen and what is the code to make the
Accept button execute properly?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top