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

Access XP event procedure question 1

Status
Not open for further replies.

Snappy2873

Programmer
Mar 29, 2002
54
US
Hello,
I'm currently working on a Access XP Db that needs input validation. I've got a Main form for Shop orders and then a subform that deals with defects associated to the shop order in question. This subform is basically a column view of the ShopOrderDefects table. The operator has the ability enter information into the following columns:

DefectCode Part No DefectLocation Qty JDECode
RIPL 600958 Shell 1 DF?
(Dropdown) (text) (text) (text) (text)

Since there are many defect codes and part numbers to a shop order, is it possible to create an event procedure that would populate the "JDECode" text field with the appropriate alphanumeric code according to the "DefectCode" selected from the dropdown? I've got about 50 "DefectCodes" with a "JDECode" associated to it. Can this be done in the "OnInsert" or "AfterInsert" event?
Any reccomendations would be greatly appreciated.
Thanks and have a nice day!
snappy
 
the best way to do it would be to create a table with all of your defect codes and JDECodes and reference it to the drop down menue you want. then when you select the defect of your choice, take the value of that and edit it to your product table. Next, and i think this is what your are asking... in the after_update section of the defect code combo box, have a case statement to change the JDECode.
or if you have the defectcode and JDEcode on the same table (as i mentioned above), you can just find which record is selected for the current defect code and place the same record in the JDECode, except you will use the JDECode field instead of the defect code field.

Durible Outer Casing to Prevent Fall-Apart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top