Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form and sub-form that allows users to split a line item.

Status
Not open for further replies.

weightinwildcat

Programmer
May 11, 2010
84
US
am working on a form and sub-form that allows users to split a line item so partial shipments can be recorded. If my text box for entering a partial amount to be split out is bound to a data source I cannot make an entry. If the text box is not bound and I make an entry, the number will appear on my sub-form for all the line items. Only one line item is processed when I click on the button for splitting the entries, but this makes the form and sub-form more awkward to use. Any thoughts?
 
It is difficult to understand what you are trying to do. When you say "split a line item" what does that mean in data terms? Are you creating a new record? Can you describe the recordsource of the main form and the subform. An example would help.
 
I am creating a new record. The data source for the sub-form, the one where a record is "split", uses a query as its data source. The query consists of two tables connected by a left join. The data source for the main table is also a query with two table connected by an inner join. The tables in the query for the sub-form are called ORDERS and ShipPartial. The ones in the query for the main form are ORDERS and CUSTOMERS.
 
If you need to create a new record based on some information from an existing record then you would do an append query. But you need to explain better what needs to be created. What table are you inserting a record to and what values are inserting and where are the values coming from. My guess you would create a procedure where you do an insert query and pass to that procedure the OrderID and Quantity based on values from the form.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top