Bear with me, because I "think" I understand, but let me know if this is correct:
A: You import data from a text file. This text file has everything you need to create a record. It also calculates certain fields, based on information found in the text file and all that data is saved to a Table, record by record.
B: Sometimes, you have to manually input records (containing like data), but, your Form does not calculate those particular field that it should. You want your form to calculate those missing fields and save that data to the table.
Is this correct?
If so, here is generatlly what you want to do:
1. When you create your Form, use the Table described. Create a text box for each field you need in the Table (I assume you have done this already. Be sure to use a good naming convention for your Text boxes, such as txtItemID, txtInventoryNumber, txtPrice, txtQuantity etc. I say this, because long-term, when you are building databases in the future, it will be helpful. make sure that the Control Source for each Text Box is proerly set.
2. When you manually enter data into your Form, you want your form to calculate other fields, yes? So, since you can't calculate the total cost of Price x Quantity, you will have to wait until you have both of those values before you calculate. Let's say that the price is entered first, then the quantity. If this is the case, for your txtQuantity text box, in the After Update property, click on the dropdown for Event Procedure and then click the three dots, which will take you to your VBA editor. Then, add some code similar to this:
- Private Sub txtQuantity_AfterUpdate()
-
Me.txtTotal = Me.txtPrice * Me.txtQuantity
-
End Sub
This will automatically update your Total Field (and update the Table). Perform similar actiohns for all of your calculated Fields.
Or, if you have a series of fields that need to be calculated at the end, you could assign all those updates to a Command Button using VBA.
Either way, this should work pretty easily, once you get the hang of it. Play around with this for a while and let me know if you run across any problems. We'll try to work through it with you.
Hope this hepps!