If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Data from multiple recs of same form to populate another form....
Hi,
I am working on a database in which I need to be able to use a cmd button to populate a new form but I need to be able to add many records from the initial form in order to do so. for example: for lack of a better example I will just make one up that will mock my real life database. I have candles of varying degrees of sizes, aromas, colors, manufacturers, etc. So each candle has its specified number such as CDL-1248. If you open the main form that the data entry occurs to record this data it is filled with data relevant to the specified candle. If I create a requesition to fulfill an order I want to be able to look at the candle record, click a command button that dumps the necessary information about the candle onto the requesition. I need to be able to find another candle (or multiple other candles) in the records of the main form and add it to to the same requisition. I am really not sure how to go about this. Any help is greatly appreciated. thank you. |
#2
|
|||
|
|||
Data from multiple recs of same form to populate another form....
If your CDL-1248 record contains all the specification about the candle -
then your main form should not be the candle but the order. You would have tables as follows -- Candle, Order, OrderItems. You might also have a Customer table so as to select customers for the orders and not type in errors. Be sure to have a primary key field in the Candle table. Create your Order table adding all the order information - Purchaser, ReqDate, EstDelivery, etc. and include a field as foreign key to match the key field of the Candle table. Create a one-to-many relationship between the Candle table and Order table selecting Referential Integerity and Cascade Update. Then having a form/subform for Order/Items set the Master/Child links with the primary key of the Order table and foreign key field of the OrderItems table. In the subform use a combo box to select items from the Candle table. -- Build a little, test a little. "Aso" wrote: Hi, I am working on a database in which I need to be able to use a cmd button to populate a new form but I need to be able to add many records from the initial form in order to do so. for example: for lack of a better example I will just make one up that will mock my real life database. I have candles of varying degrees of sizes, aromas, colors, manufacturers, etc. So each candle has its specified number such as CDL-1248. If you open the main form that the data entry occurs to record this data it is filled with data relevant to the specified candle. If I create a requesition to fulfill an order I want to be able to look at the candle record, click a command button that dumps the necessary information about the candle onto the requesition. I need to be able to find another candle (or multiple other candles) in the records of the main form and add it to to the same requisition. I am really not sure how to go about this. Any help is greatly appreciated. thank you. |
Thread Tools | |
Display Modes | |
|
|