Copy multiple fields from SubForm to Main Form.......?

J

James

Hi All.

I have a subform which displays a record selected by a combo box.

I want to copy some of the fields from the sub form to the main form.

(Field names can be the same on both forms if need be)

Can I run a macro or something to do this?

It needs to happen with the least possible steps by the user.

ie. FAST!


T.I.A.
 
J

Joseph Meehan

James said:
Hi All.

I have a subform which displays a record selected by a combo box.

I want to copy some of the fields from the sub form to the main form.

(Field names can be the same on both forms if need be)

Can I run a macro or something to do this?

It needs to happen with the least possible steps by the user.

ie. FAST!


T.I.A.

I am not sure what you are trying to do. Do you want to copy the data
from fields on the subform?

If it is really the field, then what is the data source of the field(s)
you want to copy?
 
J

James

Ok.

Subform:

Using a combo box the user selects a record based on lets say the "Serial
Number" field from the table "Products"

When they do this the other fields on the sub form display information from
the "Products" table on the record selected by serial number.
Fields included might be: "Description", "Purchase Price", "Sale Price" etc.


Main Form:

Empty fields in a Datasheet

"Serial Number", "Description", "Purchase Price", "Sale Price" etc.

What I want to do is copy the Data shown in the subform to the main form.

I am basically compiling a customer order with the user selecting products
based on "Serial Number" from the "Products" table so the action needs to be
able to be repeated any number of times to compile each customer's order.

The order is then totalled based on Sum([Sale Price]) giving the customer an
instant bottom line on their order.

The order is printed in a report.


Does that make it any clearer?
 
J

Joseph Meehan

James said:
Ok.

Subform:

Using a combo box the user selects a record based on lets say the
"Serial Number" field from the table "Products"

When they do this the other fields on the sub form display
information from the "Products" table on the record selected by
serial number.
Fields included might be: "Description", "Purchase Price", "Sale
Price" etc.


Main Form:

Empty fields in a Datasheet

"Serial Number", "Description", "Purchase Price", "Sale Price" etc.

What I want to do is copy the Data shown in the subform to the main
form.

I am basically compiling a customer order with the user selecting
products based on "Serial Number" from the "Products" table so the
action needs to be able to be repeated any number of times to compile
each customer's order.

The order is then totalled based on Sum([Sale Price]) giving the
customer an instant bottom line on their order.

The order is printed in a report.


Does that make it any clearer?

Try this idea.

Main form:

Based on and "Orders" Table

Includes the following fields:
Date
CustomerID
OrderNumber

Sub Form:

Based on "OrderItems" Table

Includes the following fields
ItemNumber
NumberOrdered
OrderNumber (link to Orders Table)
OrderPrice

Other Tables:
"Items" Including fields
ItemNumber
CurrentPrice
Description
"Customer: including fields
CustomerID
CustomerName
Customer???? (various fields like address)

MainForm based on OrderTable
SubForm based on OrderItems
 

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