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

Northwind 2010 Client database data macros

Status
Not open for further replies.

oneleaf5

Technical User
Nov 17, 2005
11
US
Hello friends,

I've been acquainting myself with the new features of Access 2010 by picking apart the Northwind 2010 example database. I'm trying to figure out how the inventory levels in the Inventory table are updated. I've located the data macro named "UpdateInventory_Received" that calls the data macro CalcInventory_Received and then updates the Received and OnOrder fields in the Inventory table with the returned values. My question is that I can't figure out what calls the "UpdateInventory_Received" data macro. It seems this macro is triggered by checking the [PostedToInventory] field via form PurchaseOrderLineItemsReceiving. However, the AfterUpdate event for the [PostedToInventory] checkbox calls data macro "GetInventoryLevels" NOT "UpdateInventory_Received". I've scoured the form and nothing else seems to trigger "UpdateInventory_Received". I've tried updating the checkbox through the table and the Received and OnOrder fields are not updated automatically like they are when the checkbox is updated through the form.

Is anyone else familiar with the Northwind 2010 example database and can point me to what triggers the "UpdateInventory_Received" data macro?

Much appreciated,

oneleaf5
 
Okay, I figured it out. The "UpdateInventory_Received" data macro is triggered by an "After Update" Event macro on table PurchaseOrderDetails. From the table design view, I clicked on the "Create Data Macros" menu option on the Ribbon > then clicked on the "After Update" menu item. This brought up the After Update data macro window, and there was macro code already written to trigger the "UpdateInventory_Received" data macro.

I guess what tripped me up is that there is no way to know if Event data macros are attached to your tables unless you explore all the Event macro options from the Ribbon. At least all the Named data macros are listed for the table when you choose the "Edit Named Macro" option from the menu. I ran the "Database Documenter" utility on table PurchaseOrderDetails from the Database Tools tab on the Ribbon, but it didn't list the Event data macros, only the table's properties and relationships.

Hope this helps,

oneleaf
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top