Normal Topic Programmatically Load Different Subform (Read 800 times)
Rod Weston
Member
*
Offline



Posts: 25
Joined: Aug 22nd, 2016
Programmatically Load Different Subform
Sep 7th, 2016 at 11:08pm
Print Post Print Post  
I am creating a form that needs to update different inventory items based on the formula used in creating our product. There are over a hundred formulas involved.

I anticipate that I would need to create a Formula form which would specify the inventory items used to create the formula. When the user fills in the formula value on the inventory utilization form, the corresponding formula record would be selected with the appropriate inventory items.

The question: how do I programmatically load the subform after entering the formula value?
  
Back to top
 
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Programmatically Load Different Subform
Reply #1 - Sep 8th, 2016 at 2:47pm
Print Post Print Post  
Rod,

Way more detail is needed to understand what you mean.

If you are saying you have a database of inventory items that is retrieved when you select the formula that you are going to use, then you would create all your formulas in a formulas database and from your "main" database retrieve it from that one with any of the many lookup commands sesame sbasic has to offer.

tell us more and I am sure someone will point you in the correct direction.
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Rod Weston
Member
*
Offline



Posts: 25
Joined: Aug 22nd, 2016
Re: Programmatically Load Different Subform
Reply #2 - Sep 8th, 2016 at 3:04pm
Print Post Print Post  
When we build a product, we need to relieve inventory of the components of that  product. The components are listed in the formula record with quantities for the individual required components.

The plan is to create a usage form that will prompt the user for the formula used to create the product and the quantities of that product we created. We would also prompt for the date the product was created and the Lot ID of the new products.

So when we enter the formula ID into the form, we need the associated components to be listed on the form, presumably on a subform but not necessarily, so we can indicate quantities and lot numbers for each of the components, then adjust the inventory accordingly.

  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Programmatically Load Different Subform
Reply #3 - Sep 8th, 2016 at 3:34pm
Print Post Print Post  
It sounds like you need to select a formula, a production date, and enter a quantity and LotID. At that point, the system would collect the formula components, multiply each by the production quantity, and reduce inventory on each item.  Based on this, you want to display the formula components for reference, but editing is not needed. Is this correct?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Rod Weston
Member
*
Offline



Posts: 25
Joined: Aug 22nd, 2016
Re: Programmatically Load Different Subform
Reply #4 - Sep 8th, 2016 at 3:47pm
Print Post Print Post  
we would need to enter the quantity and the lot ID for each component. In the course of building the product we often use more than one lot ID of an individual component. In that case we would need to enter the quantity used of the first lot ID and its associated Lot ID, then the quantity used of the second lot and its lot ID.
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Programmatically Load Different Subform
Reply #5 - Sep 8th, 2016 at 4:08pm
Print Post Print Post  
I'd do this as individual records. For each record, user selects a Formula ID. They are then offered a list of components in that formula. They select a component. They then enter the production info and move on to the next component. You can use some programming to make the process efficient by automatically stepping through each component and carrying over repeating information, but that depends on the specifics of your process.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged