ACCESS 2003 - The basic idea is to input each individual item from receipts/invoices into the Receipts form which has the Items subform as a datasheet. There is a Receipts table and an Items table linked by the Receipt number. In the Items subform, the Item is a combo box with each unique item from the table. an After_Update Event enters the appropriate information in the next 4 fields and moves to the Debit field, based on the item entered/selected. This Db is used as a single data entry point for all receipts and invoices and Excel is used to analyze the data. I started out using Select Case, but there must be a new Case added for each new item. I know there is a simple way to look this up, but I have not been able to find it. I am specifically trying to have the combo box requery the Items table after each record is entered in the Items subform, so if there are many of the same new item it will now show in the drop down when adding the next record. I used Requery, but it does not update the list until the Receipt record changes. I want it to update as each Item record is added. The code below shows the 4 fields that are entered based on the item selected. Thank you for any and all assistance.
Code:
Private Sub Item_AfterUpdate() Select Case Item Case "Apple Juice" Category = "Food - Groc - Food - 03 - AJ" CatGroup = "Grocery Costs" FMBGroup = "Food" FMBLineItem = "Food" Debit.SetFocus Case "ATT Uverse" Category = "Bills - Uverse Account Charges" CatGroup = "Other Bills" FMBGroup = "Housing" FMBLineItem = "Other Bills - AT&T Uverse Account Charges" Debit.SetFocus Case "ATT Wireless" Category = "Bills - Cellular" CatGroup = "Telephone Bill" FMBGroup = "Other Bills" FMBLineItem = "Cell Phones" Debit.SetFocus
Comment