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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trapping input errors

Status
Not open for further replies.

cantwellt

Technical User
May 28, 2000
81
US
I have a work order database that needs some error trapping to keep operators from entering wrong info. <br><br>In the main form there is a sub form in the detail section that allows input of items produced by part number. In the header I have a field called &quot;priority&quot;.<br><br>The sub form consists of the &quot;part number&quot; listbox, whose row source is a table and &quot;quantity&quot;.<br><br>My problem is that operators may input priority 3 in the main form, but choose a part number for a priority 1 in the detail.<br>If an order is priority 1 then all part numbers must be for priority 1. I need to have the part number in all the detail items and the &quot;priority&quot; in the header agree. The priorities are 1,2,or 3. The row souce table has a column for &quot;priority&quot; <br><br>Any ideas?
 
It seems to me that you could simply set the priority field on the main form to the same value of the priority field in the subform. Assuming that the priority field on the subform is stored in the table that is the record source, you can use a calculated field setup to get the field information and place it in the field on the main form. <br><br>Something else to consider:<br>User selects a priority value for a part, this in turn limits the list of available parts to only those that match that priority. Then the issue of the calculated field becomes much simpler, as you don't have to worry any more about multiple priority values on a single order.
 
&quot;If an order is priority 1 then all part numbers must be for priority 1.<br><br>If this is true, you do not need priority in your subform at all.
 
Your both right. After much reflection I think I need to limit the selections in the list box to those items that fit the priority criteria. I can also limit the department to only those part numbers that each department produces. This fixes another input problem. I can't have parts from 2 departments or more than one priority type in the same order. Thanks for the thought! Now we'll see if I can figure out how to do this! Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top