March 10, 2010 at 7:23 pm
in the MS Access version of Northwind to get the Unit price on selected index change of product. they intoduce a GetListPrice in the code behind of Order Subform. Like:
Option Compare Database
Option Explicit
Private Sub Product_ID_AfterUpdate()
'Initialize price and discount for each product change
If Not IsNull(Me![Product ID]) Then
Me![Quantity] = 0
Me.Quantity.Locked = False
Me![Unit Price] = GetListPrice(Me![Product ID])
Me![Discount] = 0
Me![Status ID] = None_OrderItemStatus
'Empty Product records mean user wants to delete line item
Else
eh.TryToRunCommand acCmdDeleteRecord
End If
End Sub
Now on the SQL server 2008 version there a similar database however everything seems to work somehow like a well oiled engine without the code behind. ummm...
How is this achieved automatically calling the ListPrice from the Product table based on OrderItem selected product. Am I missing s:dose:mething? Do I need to get me some glasses? Can anyone demystify this?
March 11, 2010 at 8:03 am
You posted this in the Access forum. Please do NOT cross-post!!!
Redirect all inquiries here: http://www.sqlservercentral.com/Forums/Topic880856-131-1.aspx
+--------------------------------------------------------------------------------------+
Check out my blog at https://pianorayk.wordpress.com/
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply