sub or function not defined

foxtet

Registered User.
Local time
Tomorrow, 02:24
Joined
May 21, 2011
Messages
129
Hi friends could you have look at on this issue.
when run it gives error sub or function not defined. Adopted from nothwind databse.

Private Sub ServiceID_AfterUpdate()
'Initialize price and discount for each product change
If Not IsNull(Me![ServiceID]) Then
Me![Quantity] = 0
Me.Quantity.Locked = False
Me![Unit Price] = GetStandardPrice(Me![ServiceID])
'Me![Discount] = 0
'Me![Status ID] = None_OrderItemStatus


'Empty Service records mean user wants to delete line item
Else
'eh.TryToRunCommand acCmdDeleteRecord
End If
End Sub


Foxtt
 

Attachments

  • Error.jpg
    Error.jpg
    78 KB · Views: 159
Please show us the code for
GetStandardPrice()
 
Function GetUnitPrice(lServiceIDID As Long) As Currency
GetUnitPrice = DLookupNumberWrapper("
[List Price]", "tblServices", "[ID] = " & lServiceID)
End Function
 
Your original code is
Code:
...
Me![Unit Price] = [B]GetStandardPrice[/B](Me![ServiceID])
...

You are showing a routine called GetUnitPrice
 
Hi
have a look at table structure for more details. Help me to way forward with issuing services.

Foxtet
 

Attachments

Users who are viewing this thread

Back
Top Bottom